Référence · Visuel et spatial
Graphisme
45 fonctions dans 10 classes, groupées par ce qu'elles font, chacune avec l'explication que la bibliothèque donne d'elle-même.
Le récit de ce domaine, pour un lecteur général : ce qu'un artisan en fait, un exemple exécuté et ses couloirs notés, est sur sa page de la Plateforme.
Les fonctions, par ce qu'elles font
Tester et vérifier
- IsSound SOUND IS NO ERROR -- the house's one answer, as in stzFrameGraph, and for the same reason: the findings are NAMED now, so the report that ingests them can read a severity at all. dans stzMaterialGraph
exemple composé
o1 = new stzMaterialGraph() o1.TakesColor(:warm) o1.TakesColor(:cool) o1.TakesScalar(:sharp) o1.AddNode(:final, [ :Op = :Mix, :In = [ :shaded, :warm, :rim ] ]) o1.AddNode(:rim, [ :Op = :Fresnel, :In = [ :sharp ] ]) o1.AddNode(:shaded, [ :Op = :Multiply, :In = [ :cool, :lit ] ]) o1.AddNode(:lit, [ :Op = :Lit, :In = [ 0.25 ] ]) o1.Emits(:final) o1.Compile() ? o1.IsSound() #--> 1
composé à partir de la signature, exécuté pour cette page - IsOpen state --------------------------------------------------------------- TRUE until the user closes it (the X button, Alt-F4) or Close() is called. This is the `while` condition of every frame loop. dans stzWindow
- IsRtlParagraph TRUE when the paragraph's own base direction is right-to-left -- which decides where the caret sits past the last character. dans stzFont
Remplacer et modifier
- SetParent A parent that does not exist, or an instance parented to itself, is REFUSED. A cycle is broken and COUNTED (CyclesRefused) rather than hung on -- a graph the caller built wrong must not freeze the frame. dans stzScene
exemple composé
o1 = new stzScene(1100, 660) ? o1.SetParent(2, 5) #--> 0
composé à partir de la signature, exécuté pour cette page - SetRegion Panning a viewer over a huge diagram is the same call with a different origin, which is why this is one feature and not two. dans stzCanvas
- SetPickTag A tag rather than a shape index, because a node is several commands -- a fill, a stroke, a label -- and every one of them is the same node to a reader pointing at it. Zero is "no identity", which is what backgrounds and decorations keep. dans stzCanvas
- SetSvgIdent REFUSES a name that is not an XML name rather than escaping it. A name that arrives as `a b"c` and leaves as `a b"c` is one the consumer cannot write down or select on -- the mangling would be discovered by them and the refusal is discovered here. dans stzCanvas
- SetBackground canvas-wide state dans stzCanvas
- SetLight A directional light: the direction it SHINES (so 0,-1,0 is noon), its colour, and the ambient that fills the shadows. dans stzScene
- SetCamera Eye and target in scene units. Field of view, near and far are optional -- 45 degrees over 0.1..200 suits most scenes. dans stzScene
- SetMaterial oScene.SetMaterial(oMaterial, [ :base = "#e0a030", :glow = 0.6 ]) oScene.ClearMaterial() # back to forward-lit dans stzScene
- SetSize Resize from code. The size lands at the next Poll(), which is also where the swapchain reconfigures -- so this drives exactly the path a dragged window edge drives, and that is why it exists: without it the resize path could only ever be tested by a person with a mouse. dans stzWindow
- SetVSync presentation knobs -------------------------------------------------- VSync ON (the default) caps the loop at the monitor's refresh and never tears. OFF runs as fast as the card allows -- the honest way to MEASURE frame cost, and the wrong way to ship. Answers FALSE when the card refuses the mode rather than pretending it changed. dans stzWindow
Retirer
- ClearParent Detach: the instance keeps its LOCAL transform and becomes a root. dans stzScene
exemple composé
o1 = new stzScene(1100, 660) ? o1.ClearParent(2) #--> 0
composé à partir de la signature, exécuté pour cette page - ClearRegion Back to the whole picture. dans stzCanvas
- ClearSvgIdent Back to no identity -- the next shapes belong to no element. dans stzCanvas
Ajouter
- AddRect adding shapes dans stzCanvas
exemple composé
o1 = new stzCanvas(1240, 1000) o1.AddRect(2, 5, 2, 2) ? o1.Content() #--> <svg xmlns="http://www.w3.org/2000/svg" width="1240" height="1000" viewBox="0 0 1240 1000"> #--> <rect x="2" y="5" width="2" height="2" fill="rgb(255,255,255)"/> #--> </svg>
composé à partir de la signature, exécuté pour cette page - AddMesh paVerts is flat -- x, y, r, g, b, a per vertex, pixel space, channels 0..255. paIndices is 0-based triangle indices into it. Both tiers carry it: the GPU draws the triangles through the ordinary shape pipeline (no new shader, no extra draw call), and ToSVG() emits one <polygon> per triangle -- exact for flat-coloured UI geometry, an approximation for a gradient mesh, where the GPU interpolates and SVG cannot. dans stzCanvas
- AddText (pnX, pnY) is the BASELINE origin -- where the text sits, not its box. dans stzCanvas
- AddImage Both tiers carry it: the GPU draws a textured quad, and ToSVG() embeds a base64 PNG -- so a picture with a spectrogram in it is still one self-contained file that needs no device. dans stzCanvas
- AddEllipse The primitive the DIAGRAM layer was missing. Of graphviz's 24 node shapes, twenty are a circle, a rect or a polygon -- all already here -- and the remaining four (ellipse, egg, cylinder, doublecircle) all need this one. Tessellated engine-side, on the same segment bound as the circle, so a stroked ellipse traces exactly the filled one. dans stzCanvas
- AddPolyline paPoints is flat: [ x1,y1, x2,y2, ... ] dans stzCanvas
- AddRoundRect A ROUNDED rectangle -- the visual signature of every diagram graphviz draws with style=rounded, which is what an org chart looks like. dans stzCanvas
- AddGradientRect A rectangle whose fill runs from one colour to another; bVertical picks the axis. dans stzCanvas
- AddVerticalText A Latin word inside a column stands upright here, one letter under the next, where a reader would expect it lying on its side. That is named as a limit in SOFTANZA_GRAPHICS_PLAN.md rather than implied. dans stzCanvas
- AddJustifiedText The engine elongates first and shares whatever is left over the spaces, so the line lands on the width exactly. A width no greater than the text's own leaves the text alone: this stretches, and it never compresses. dans stzCanvas
- AddFallback The chain is ORDERED and the font itself is always asked first, so a fallback never takes a glyph the author's own font could have drawn. Adding the same font twice does nothing; a font cannot fall back to itself, and neither refusal is silent. dans stzFont
- AddNode declaring the graph ------------------------------------------------- paSpec: [ :Op = :Mix, :In = [ ... ] ] An input is a NODE name, a declared colour/scalar/texture name, a builtin written "@normal.y", or a plain NUMBER. dans stzMaterialGraph
et 1 autres dans la référence
Ordonner et déplacer
- MoveTo transform state (kept apart from what is drawn) dans stzScene
Convertir
- ToPNG Four is the knee and the rest is a bad trade: five through seven buy 1.3% for another 2.4 ms, and nine spends 5.1x the time of one to beat four by 4%. So four is the default and the dial is exposed, because a caller writing one file for a page and a caller writing nine hundred for a test suite are not answering the same question. dans stzCanvas
- ToSVG Vector. Needs NO device -- always available, everywhere. dans stzCanvas
- ToPixels Raw RGBA8 bytes of the GPU tier, for a caller that wants the pixels themselves (comparisons, compositing, tests). dans stzCanvas
- ToPNGHiRes 4x MSAA antialiases a shape's edges and still beads a thin near-axis line light and dark along its length: its four samples are fixed, so a half-pixel diagonal catches them unevenly. Rendering at 2x gives sixteen effective samples where the line is and the bead fills in. It is not the default -- a test that compares rendered bytes wants the plain render, and a nine-hundred-file suite does not want to pay 4x the fill -- so a FIGURE meant to be shown asks for it and a check does not. Two is the knee; three and four are for print. dans stzCanvas
- ToPixelsHiRes ...and the supersampled pixels, box-averaged down: what ToPNGHiRes writes, for a caller that wants the bytes rather than a file. dans stzCanvas
- ToW emitting ------------------------------------------------------------ The material-language BODY, in the derived order. This is the artefact: a graph that emitted text you can read is a graph you can debug. dans stzMaterialGraph
- ToMaterial The material itself, ready for stzScene.SetMaterial. dans stzMaterialGraph
- ToCanvas the two tiers, inherited by handing back an stzCanvas dans stzGraphCanvas
- ToWGSL Transpile (engine-side) and cache. Raises with the engine's refusal message on a bad description -- the transpile is documented BY ITS OUTPUT, so nothing about the shader is hidden. dans stzMaterialMaker
- ToCSS exporting dans stzTheme
Afficher, dessiner et mettre en forme
- Format The vertex format the pipeline is built from ("3,3,2"). Derived from the attributes -- extending the mesh extends this, and nothing else. dans stzMesh
exemple composé
o1 = new stzMesh([ :Torus, 1.5, 0.55, 96, 48 ]) ? o1.Format() #--> 3,3,2
composé à partir de la signature, exécuté pour cette page - Show Put the picture in front of a person. A real WINDOW when this machine has one (GR5) -- Escape or the X button closes it, and the picture never touches the disk. Otherwise the old path: write a PNG (or an SVG with no device) and ask the OS to open it, which is what a headless box or a machine without stz_window.dll still deserves. Returns the frame count when it opened a window, the file path when it fell back -- so a caller can always tell which happened. dans stzCanvas
Parcourir et appliquer
- EachFrame Run a frame loop, calling pFunc(This) once per frame until the window closes. The anonymous function does the updating and the drawing; this only owns the pump. Escape closes, because a window with no way out is a bug in every program that ever shipped one. dans stzWindow
- RunCountOf How many VISUAL runs the text breaks into: 1 for pure Latin or pure Arabic, 3 for "abc عربي xyz". Bidi made inspectable. dans stzFont
- Execute Each body is called as fBody(oFrameGraph, cPassName). It asks the graph which physical target its writes landed on. dans stzFrameGraph
Les explications sont celles que la bibliothèque donne d'elle-même, en anglais, lues dans ses commentaires de documentation le 2026-10-01 04:14, from the library at commit 0e72e2e2c, by the library's own stzSelfDoc over 635 class sources.
Les classes de ce domaine
- stzCanvas · 41 méthodes
- stzScene · 41 méthodes
- stzWindow · 32 méthodes
- stzFont · 23 méthodes
- stzMaterialGraph · 20 méthodes
- stzGraphCanvas · 18 méthodes
- stzFrameGraph · 16 méthodes
- stzMaterialMaker · 12 méthodes
- stzMesh · 11 méthodes
- stzTheme · 10 méthodes
Les narrations sur ce domaine
Aucune narration n'est encore rattachée à ce domaine.

