Softanza
StartFrançais
Softanza
The library documents itself · Diagramming & graphs

stzMathDiagram

83 own methods · 10 forms written with extensions, listed under their method

the source: base/graph/stzMathDiagram.ring(opens in a new tab) · All classes · The area reference: Diagramming & graphs

Under each method, its extensions (Q CS XT Z ZZ IB W U): bold and ticked, it exists; struck, it does not. The extensions and what they mean

Examples: 0 come from the library's tests; 25 were composed from each method's signature and run for this page, on a fresh object, for example o1 = new stzMathDiagram(StzGraphDomain(), new stzMathSubstance(StzGraphDomain()), StzCurvedGraphStyle()). 58 methods have none yet. Examples run on 2026-10-03 20:34 inside the library at commit 0e72e2e2c.

Method
Explanation, as the source carries it
init
(no comment in the source: the name reads as a sentence) initno extension
SetFont
knobsQCSXTZZZIBWU
SetVariation
Penrose's "variation": the same string, the same picture. Any text folds to a seed; a number is used as it is. SeedRandom refuses a seed at or above 1,999,999,999, so the fold stays under it.QCSXTZZZIBWU
SolveProfile
the live figure (DN8g) -------------------------------------------------- A RE-SOLVE FROM WHERE THE FIGURE STANDS. Nothing is recompiled and no start is drawn: the current values are the start, and the solver settles the picture nearby. LayoutMs() then reports this solve. where the last solve spent its time, in ms: building the energy text, compiling it, minimising, reading the violations, and folding derived names to numbers (counted inside :text) -- plus the roundsno extension
Relayout
(no comment in the source: the name reads as a sentence) relayoutin the section Same as Layout: the answerQCSXTZZZIBWU
DragTo
THE DRAG. The shape's centre is put where the author released it, held there while the rest of the figure re-solves around it, and let go again unless it was pinned before. A shape whose centre no rule left free -- a placed name, a square derived from its triangle -- is refused: there is nothing there to drag.QCSXTZZZIBWU
Pin
A PIN holds every free property of a shape at its current value through any re-solve, cold or warm -- the plastic editor's pin, for a figure whose coordinates are solved rather than laid out.QCSXTZZZIBWU
Unpin
(no comment in the source: the name reads as a sentence) unpinQCSXTZZZIBWU
UnpinAll
(no comment in the source: the name reads as a sentence) unpin allno extension
IsPinned
(no comment in the source: the name reads as a sentence) is pinned
composed example
o1 = new stzMathDiagram(StzGraphDomain(), new stzMathSubstance(StzGraphDomain()), StzCurvedGraphStyle())
? o1.IsPinned("a")
#--> 0
composed from the signature, run for this page
no extension
Pins
the shapes pinned, by pathno extension
Draggable
the shapes a gesture can take hold of: a free centre, and a bodyno extension
PickAt
WHAT IS UNDER THE POINTER: the nearest draggable shape whose body -- or a ten-pixel reach around its centre -- holds the point; "" when the pointer is on the paper.no extension
OnPress
THE GESTURE, in the plastic editor's three verbs. A press takes hold of what is under the pointer; a move previews and re-solves NOTHING -- the window paints the dragged shape where DragPreview() says -- and the release is the one drag, from where the author let go.no extension
OnMove
(no comment in the source: the name reads as a sentence) on moveno extension
DragPreview
(no comment in the source: the name reads as a sentence) drag previewno extension
OnRelease
(no comment in the source: the name reads as a sentence) on releaseno extension
UiState
(no comment in the source: the name reads as a sentence) ui state
composed example
o1 = new stzMathDiagram(StzGraphDomain(), new stzMathSubstance(StzGraphDomain()), StzCurvedGraphStyle())
? o1.UiState()
#--> idle
composed from the signature, run for this page
no extension
Layout
the answerQCSXTZZZIBWU
IsFeasible
(no comment in the source: the name reads as a sentence) is feasiblein the section Same as Layout: the answer
composed example
o1 = new stzMathDiagram(StzGraphDomain(), new stzMathSubstance(StzGraphDomain()), StzCurvedGraphStyle())
? o1.IsFeasible()
#--> 1
composed from the signature, run for this page
no extension
Violation
The largest constraint violation, in pixels. Zero is a lawful picture.
composed example
o1 = new stzMathDiagram(StzGraphDomain(), new stzMathSubstance(StzGraphDomain()), StzCurvedGraphStyle())
? o1.Violation()
#--> 0
composed from the signature, run for this page
no extension
Violations
Every constraint with its violation, in the house rule shape so a CI gate can ingest it: a contradictory substance is a FINDING, not a crash -- Penrose's Fig. 2, a logically inconsistent program that "fails gracefully, providing visual intuition for why".no extension
Energy
(no comment in the source: the name reads as a sentence) energyin the section Same as Layout: the answer
composed example
o1 = new stzMathDiagram(StzGraphDomain(), new stzMathSubstance(StzGraphDomain()), StzCurvedGraphStyle())
? o1.Energy()
#--> 0
composed from the signature, run for this page
no extension
Rounds
(no comment in the source: the name reads as a sentence) roundsin the section Same as Layout: the answer
composed example
o1 = new stzMathDiagram(StzGraphDomain(), new stzMathSubstance(StzGraphDomain()), StzCurvedGraphStyle())
? o1.Rounds()
#--> 0
composed from the signature, run for this page
no extension
Evaluations
(no comment in the source: the name reads as a sentence) evaluationsin the section Same as Layout: the answerno extension
LayoutMs
(no comment in the source: the name reads as a sentence) layout msin the section Same as Layout: the answerno extension
NumberOfUnknowns
(no comment in the source: the name reads as a sentence) number of unknownsin the section Same as Layout: the answerno extension
NumberOfConstraints
(no comment in the source: the name reads as a sentence) number of constraintsin the section Same as Layout: the answer
composed example
o1 = new stzMathDiagram(StzGraphDomain(), new stzMathSubstance(StzGraphDomain()), StzCurvedGraphStyle())
? o1.NumberOfConstraints()
#--> 0
composed from the signature, run for this page
no extension
Why
(no comment in the source: the name reads as a sentence) whyin the section Same as Layout: the answer
composed example
o1 = new stzMathDiagram(StzGraphDomain(), new stzMathSubstance(StzGraphDomain()), StzCurvedGraphStyle())
? o1.Why()
#--> nothing to lay out -- no rule minted an unknown
composed from the signature, run for this page
no extension
CanvasWidth
the paper, and what a shape is beyond its geometry -- for the rules that judge a picture rather than solve it (DN8c)
composed example
o1 = new stzMathDiagram(StzGraphDomain(), new stzMathSubstance(StzGraphDomain()), StzCurvedGraphStyle())
? o1.CanvasWidth()
#--> 720
composed from the signature, run for this page
no extension
CanvasHeight
(no comment in the source: the name reads as a sentence) canvas height
composed example
o1 = new stzMathDiagram(StzGraphDomain(), new stzMathSubstance(StzGraphDomain()), StzCurvedGraphStyle())
? o1.CanvasHeight()
#--> 640
composed from the signature, run for this page
no extension
ShapeOwnerOf
(no comment in the source: the name reads as a sentence) shape owner ofin the section Same as Layout: the answerno extension
IsHidden
(no comment in the source: the name reads as a sentence) is hiddenin the section Same as Layout: the answer
composed example
o1 = new stzMathDiagram(StzGraphDomain(), new stzMathSubstance(StzGraphDomain()), StzCurvedGraphStyle())
? o1.IsHidden("a")
#--> 1
composed from the signature, run for this page
no extension
PropOf
(no comment in the source: the name reads as a sentence) prop ofin the section Same as Layout: the answerno extension
ShapeOf
The solved geometry of one shape: [ :kind, :cx, :cy, :r ] for a circle, [ :kind, :cx, :cy, :w, :h ] for a rect or text, [ :kind, :x1, :y1, :x2, :y2 ] for a line.no extension
ValueOf
The solved value of any name: an unknown, a constant, a field, a derived property -- "u.arrow.x2", "U.ox".
composed example
o1 = new stzMathDiagram(StzGraphDomain(), new stzMathSubstance(StzGraphDomain()), StzCurvedGraphStyle())
? o1.ValueOf("a")
#--> 0
composed from the signature, run for this page
no extension
Shapes
(no comment in the source: the name reads as a sentence) shapesin the section Same as Layout: the answerno extension
NumberOfShapes
(no comment in the source: the name reads as a sentence) number of shapesin the section Same as Layout: the answer
composed example
o1 = new stzMathDiagram(StzGraphDomain(), new stzMathSubstance(StzGraphDomain()), StzCurvedGraphStyle())
? o1.NumberOfShapes()
#--> 0
composed from the signature, run for this page
no extension
DrawIndexOf
Where a shape falls in the drawing order: 1 is painted first and so sits at the back. A shape that must not be buried has to come out with a HIGHER index than everything that could cover it, and that is a fact about the picture worth asserting rather than eyeballing -- layering is a partial order, and the depths it relaxes to are not obvious from reading the rules.no extension
PolygonOf
A polygon's vertices, or a spline's control points, in order: [ x1, y1, x2, y2, ... ].no extension
SplinePointsOf
The polyline a spline is drawn as, in px -- the control points are in PolygonOf. CATMULL-ROM, CENTRIPETAL: for each span P1-P2 the four points P0..P3 are blended with knots spaced by the square root of the chord, which is the parametrisation that never cusps or loops between two points however they are spaced (Yuksel, Schaefer, Keyser 2011). An open spline doubles its end points so the curve reaches them; a closed one wraps. Twelve samples per span.no extension
CurvePointsOf
The polyline a geodesic is drawn as: [ x1, y1, x2, y2, ... ] in px.no extension
MarkStrokesOf
The strokes a mark is drawn as: a list of polylines, each flat in px.no extension
ToCanvas
drawingno extension
ToSVG
(no comment in the source: the name reads as a sentence) to svg
composed example
o1 = new stzMathDiagram(StzGraphDomain(), new stzMathSubstance(StzGraphDomain()), StzCurvedGraphStyle())
? o1.ToSVG()
#--> <svg xmlns="http://www.w3.org/2000/svg" width="720" height="640" viewBox="0 0 720 640">
#--> <rect x="0" y="0" width="720" height="640" fill="rgb(255,255,255)"/>
#--> </svg>
composed from the signature, run for this page
no extension
Rendition
A VALUE THAT SAYS WHAT IT IS (DN9g) --------------------------------- A picture's natural rendition is its drawn geometry, which travels as text and needs no file. The raster and the substance's graph are the same picture seen the other two ways a consumer asked for.no extension
RenditionKinds
(no comment in the source: the name reads as a sentence) rendition kinds
composed example
o1 = new stzMathDiagram(StzGraphDomain(), new stzMathSubstance(StzGraphDomain()), StzCurvedGraphStyle())
? @@( o1.RenditionKinds() )
#--> [ "vector", "image", "graph", "text" ]
composed from the signature, run for this page
no extension
RenditionAs
(no comment in the source: the name reads as a sentence) rendition asQCSXTZZZIBWU
RenditionAtQ
Same as RenditionAsXT: An empty path means the name this class would have chosen, so every caller written before today means exactly what it meant. A path given for a CARRIED kind is refused by name rather than ignored: a caller who asks for an SVG at a path is not asking for nothing, they are holding a wrong belief about the contract, and being told is the cheaper outcome.no extension
Substance
(no comment in the source: the name reads as a sentence) substanceno extension
ToPNG
(no comment in the source: the name reads as a sentence) to pngno extension
Fact
THE GENERAL KIND IS :expr, and the others are its named shortcuts. A picture already has a language for talking about itself -- the one a Style writes its rules in -- so a fact asks a question in that language and the answer comes off the same tape the solver used. That is what makes a caption's number the picture's number rather than a second calculation that could drift from it.no extension
ConstraintText
the energy text of a rule, so a narration can show what the engine was handed and how big it becameno extension
SetPictureTheme
WHAT A FRAME MAY CHANGE BETWEEN TWO PICTURES (DN9f). Haro copies an object on assignment, so a caller holding the substance or the style is holding a different one from the picture's; these are the doors through which a narration's action reaches the picture it is about.no extension
SetSubstanceData
A DATUM IS CONTENT, so changing one means the picture is compiled again -- unlike a theme, which changes only what a role resolves to.no extension
SetWindow
WHAT DOES NOT SCALE IS THE TYPE. A zoom here is for reading, not a photographic enlargement: the names keep their size and only their positions move, so a close view is more legible rather than merely bigger. Stroke widths do scale, because a hairline blown up eight times and still one pixel wide reads as a different picture.QCSXTZZZIBWU
WindowOn
centred on what a frame is about, with a reach around it -- the form an author actually writesQCSXTZZZIBWU
ClearWindow
(no comment in the source: the name reads as a sentence) clear windowno extension
HasWindow
(no comment in the source: the name reads as a sentence) has window
composed example
o1 = new stzMathDiagram(StzGraphDomain(), new stzMathSubstance(StzGraphDomain()), StzCurvedGraphStyle())
? o1.HasWindow()
#--> 0
composed from the signature, run for this page
no extension
Window
(no comment in the source: the name reads as a sentence) windowno extension
WindowScale
how much bigger the view is than the figure; 1 with no window
composed example
o1 = new stzMathDiagram(StzGraphDomain(), new stzMathSubstance(StzGraphDomain()), StzCurvedGraphStyle())
? o1.WindowScale()
#--> 1
composed from the signature, run for this page
no extension
IsInWindow
IS THIS THING IN VIEW? What a frame shows decides whether a mark is any use, and a mark pointing at something outside the window is a narration defect the one gate reports.
composed example
o1 = new stzMathDiagram(StzGraphDomain(), new stzMathSubstance(StzGraphDomain()), StzCurvedGraphStyle())
? o1.IsInWindow("a")
#--> 1
composed from the signature, run for this page
no extension
VisibleShapes
the shapes a reader can actually see, in draw orderno extension
Emphasis
EVERY MARK IS DERIVED, NEVER PLACED. Its geometry comes from the picture's solved values or from a rule actually in force -- which is the whole point of the plane, because a mark a person positions is a mark nobody checks. Marks are minted AFTER the solve and hold every existing unknown pinned while they place themselves, so adding one cannot move the figure it describes: frame two's figure is frame one's figure, to the last pixel. A HARO, A FOCUS OR A DIM. Emphasis changes how a shape already in the picture reads, so it mints nothing for :focus and :dim -- it rewrites the shape's own stroke -- and mints one circle for :ring.no extension
Measure
A DIMENSION BETWEEN TWO THINGS, WITH ITS NUMBER. The line runs centre to centre, the number is the distance FACT -- so the figure and the caption cannot disagree -- and the number's own label is solved off the ink like any other name.no extension
Callout
A SENTENCE ATTACHED TO A THING. The sentence may carry a hole, and a hole is filled from a FACT rather than typed -- which is the rule the whole plane exists to enforce. The label is solved: off the ink, off other names, on the paper, exactly as a vertex's name is, which is why a callout needed no new solver.no extension
Show
A RULE'S OWN BOUNDARY, AS A SHAPE. The leash a name must stay inside is a circle nobody ever drew, because it exists only as a term in the energy; showing it is reading that term's own arguments and turning them into geometry. Only the forms whose boundary IS a shape are shown, and the rest are refused by name rather than approximated.no extension
Region
AN AREA, TINTED. Where Show draws a boundary, Region fills what the boundary encloses -- the strip an edge forbids, the disc a clearance reserves. A strip is the segment's own rectangle, four corners derived from the segment's direction, so it bends with the picture.no extension
Marks
what this picture carries, as [ path, kind ] -- so a frame can say what it added and a later frame can take it away againno extension
NumberOfMarks
(no comment in the source: the name reads as a sentence) number of marks
composed example
o1 = new stzMathDiagram(StzGraphDomain(), new stzMathSubstance(StzGraphDomain()), StzCurvedGraphStyle())
? o1.NumberOfMarks()
#--> 0
composed from the signature, run for this page
no extension
ClearMarks
(no comment in the source: the name reads as a sentence) clear marksno extension
FillOf
The colour a shape is drawn with, after its rule is resolved: what the guard reads, and what a consumer of the SVG gets.no extension
StrokeOf
(no comment in the source: the name reads as a sentence) stroke ofin the section Same as Layout: the answerno extension
Background
the paper's colour: the theme's background
composed example
o1 = new stzMathDiagram(StzGraphDomain(), new stzMathSubstance(StzGraphDomain()), StzCurvedGraphStyle())
? o1.Background()
#--> #FFFFFF
composed from the signature, run for this page
no extension
MatchCandidates
how many candidate bindings the last compile enumerated
composed example
o1 = new stzMathDiagram(StzGraphDomain(), new stzMathSubstance(StzGraphDomain()), StzCurvedGraphStyle())
? o1.MatchCandidates()
#--> 0
composed from the signature, run for this page
no extension
StartsTried
Uniform over the canvas, as Penrose samples; radii and sizes from a band that gives the solver room. Three draws, the one with the least initial energy kept -- Penrose 4.2.1. How many starts the last layout needed, and which one it kept. A start the graph could not give -- a planar one on a tree, a layout on a substance with no graph -- falls back to random and says so.
composed example
o1 = new stzMathDiagram(StzGraphDomain(), new stzMathSubstance(StzGraphDomain()), StzCurvedGraphStyle())
? o1.StartsTried()
#--> 0
composed from the signature, run for this page
no extension
AdvisoryUnmet
Crossing rules left unmet when the start was not planar and the rule was therefore advice: zero for a planar start, and for any picture that has no crossing rule.
composed example
o1 = new stzMathDiagram(StzGraphDomain(), new stzMathSubstance(StzGraphDomain()), StzCurvedGraphStyle())
? o1.AdvisoryUnmet()
#--> 0
composed from the signature, run for this page
no extension
StartUsed
(no comment in the source: the name reads as a sentence) start usedin the section Same as Layout: the answer
composed example
o1 = new stzMathDiagram(StzGraphDomain(), new stzMathSubstance(StzGraphDomain()), StzCurvedGraphStyle())
? o1.StartUsed()
#--> random
composed from the signature, run for this page
no extension
StartedPlanar
Did the last layout begin from a planar embedding? False when the style asked for none, and false when it asked and the graph could not give one -- a tree, a path, anything Tutte collapses.
composed example
o1 = new stzMathDiagram(StzGraphDomain(), new stzMathSubstance(StzGraphDomain()), StzCurvedGraphStyle())
? o1.StartedPlanar()
#--> 0
composed from the signature, run for this page
no extension
OuterFace
The face the planar start was built on, as object names in cycle order; empty when there was no planar start.no extension
Touch
(no comment in the source: the name reads as a sentence) touchno extension
Ink
Every drawn stroke as a segment, [ x1, y1, x2, y2, cOwner, cPath ] -- what a rule that judges the picture reads, once per solveno extension
Texts
EVERY DRAWN NAME -- the text shapes that are visible and say something -- once per solve, like the ink. Every name rule's scope listed them by resolving every shape of the picture, and the governance asks a scope thousands of times: on the five-thousand-dot picture that was five thousand resolutions per ask.no extension