====== std.svg.xml ====== Interner XML-Schreiber der SVG-Bibliothek: Puffer-Management, Zahlenformatierung (f64 → kompakter SVG-String), Attribut-Escaping und Dokumentstruktur (XML-Deklaration, SVG-Namespace). Wird von allen anderen SVG-Units intern verwendet — direkte Nutzung ist nur für benutzerdefinierte SVG-Elemente nötig. → [[lyx_-_programmiersprache:units:svg|std.svg]] · [[lyx_-_programmiersprache:units:svg:builder|std.svg.builder]] ---- ===== Funktionen ===== ^ Signatur ^ Sichtbarkeit ^ Beschreibung ^ | ''svgF64x100(v: f64): int64'' | pub | f64 IEEE bit utilities (f64 arithmetic is broken in Lyx — use bit manipulation) Convert positive f64 to integer × 100 (2 decimal places, rounded) | | ''svgF64Trunc(v: f64): int64'' | pub | Extract integer part of positive f64 | | ''_svgWc(doc: int64, c: int64): void'' | pub | Write to main buffer | | ''_svgW(doc: int64, s: pchar): void'' | pub | — | | ''_svgWi(doc: int64, v: int64): void'' | pub | — | | ''_svgWf(doc: int64, v: f64): void'' | pub | — | | ''_svgWbytes(doc: int64, src: int64, n: int64): void'' | pub | — | | ''_svgWinline(doc: int64, offset: int64): void'' | pub | — | | ''_svgDc(doc: int64, c: int64): void'' | pub | Write to defs buffer | | ''_svgD(doc: int64, s: pchar): void'' | pub | — | | ''_svgDi(doc: int64, v: int64): void'' | pub | — | | ''_svgDf(doc: int64, v: f64): void'' | pub | — | | ''_svgDbytes(doc: int64, src: int64, n: int64): void'' | pub | — | | ''_svgDinline(doc: int64, offset: int64): void'' | pub | — | | ''_svgPc(doc: int64, c: int64): void'' | pub | Write to path buffer | | ''_svgP(doc: int64, s: pchar): void'' | pub | — | | ''_svgPf(doc: int64, v: f64): void'' | pub | — | | ''_svgIndent(doc: int64): void'' | pub | Indentation / newline helpers | | ''_svgNL(doc: int64): void'' | pub | — | | ''_defsIndent(doc: int64): void'' | pub | — | | ''_defsNL(doc: int64): void'' | pub | — | | ''_svgSetInline(doc: int64, offset: int64, s: pchar): void'' | pub | Inline string helpers | | ''_svgInlineLen(doc: int64, offset: int64): int64'' | pub | — | | ''_svgCopyInline(out: int64, pos: int64, doc: int64, offset: int64): int64'' | pub | Copy inline string from doc struct to output buffer, return new pos | | ''_svgTransformAppend(doc: int64, s: pchar): void'' | pub | Append s to inline transform buffer (SVG_TRANSFORM, 512 bytes) | | ''svgColorHex(r: f64, g: f64, b: f64, out: int64): void'' | pub | — | | ''svgBufF64r2x100(buf: int64, pos: int64, v100: int64): int64'' | pub | Write "rgb 100-based value as 2dp decimal" to buffer at pos, return new pos | | ''svgBufInt(buf: int64, pos: int64, v: int64): int64'' | pub | Write integer to buffer at pos, return new pos | | ''svgBufStr(buf: int64, pos: int64, s: pchar): int64'' | pub | Write string to buffer at pos, return new pos | | ''svgBufF64(buf: int64, pos: int64, v: f64): int64'' | pub | Write f64 (2 decimal places) to buffer at pos, return new pos | | ''_svgWescText(doc: int64, s: pchar): void'' | pub | XML-escape text content to main buffer | | ''_svgWescAttr(doc: int64, s: pchar): void'' | pub | XML-escape attribute value to main buffer | | ''_svgAc(doc: int64, c: int64): void'' | pub | Pending animation buffer (SVG_ANIM_BUF: 1020 bytes inline in doc struct) Used by anim.lyx to queue child elements before SvgApply flushes them. | | ''_svgA(doc: int64, s: pchar): void'' | pub | — | | ''_svgAi(doc: int64, v: int64): void'' | pub | — | | ''_svgAf(doc: int64, v: f64): void'' | pub | — | | ''svgInt100ToF64(v100: int64): f64'' | pub | Integer × 100 → f64 conversion (inverse of svgF64x100) Constructs valid IEEE 754 bits via bit manipulation (f64 arithmetic broken) | ---- //Signaturen automatisch aus ''std/svg/xml.lyx'' erzeugt (Stand 2026-08-02, lyxc 1.0.21A). Beschreibungen stammen aus den Quellkommentaren und sind teilweise unvollständig.//