VerticesComp(3U)
π VerticesComp(3U) β bestie edition π
okay so this is from the InterViews Reference Manual, and it's giving "abstract base class trilogy" energy. three icons, one page. let's go β¨
πΈ NAME πΈ
VerticesComp, VerticesView, PSVertices β the abstract base classes for vertexed graphical component subjects and their views and their PostScript external representations. three of them. a whole squad π«Ά
β¨ SYNOPSIS β¨
#include <Unidraw/Components/vertices.h>
that's it. that's the whole synopsis. short and iconic π
π¦ DESCRIPTION π¦
okay so real talk, all three of these are abstract β meaning you don't instantiate them directly, you subclass them. they're the blueprint, not the fit. periodt.
VerticesComp is an abstract base class for graphical components whose geometry can be expressed as a list of coordinate pairs. literally just points. a whole vibe made of points. and it uses a Vertices graphic to store its graphical attributes β that's where the β¨lookβ¨ lives.
VerticesView is an abstract GraphicView subclass for displaying a VerticesComp. it's the view. it shows the thing. main character energy but for rendering π
PSVertices is an abstract PostScriptView for subclasses that externalize VerticesComp information in PostScript form. so likeβ¦ it's the version of your vertices that escapes into the printer world. no cap π¨οΈ
π VERTICESCOMP PUBLIC OPERATIONS π
Vertices* GetVertices()β returns theVerticesgraphic that defines the vertices's attributes. and ngl,GetVerticesis literally just a more specific form of theGetGraphicoperation. same energy, more precision π
π VERTICESCOMP PROTECTED OPERATIONS π
VerticesComp(Vertices* = nil)β the constructor, bestie. it takes an optional vertices graphic that defines the component's graphical attributes. pass nothing? cool,nilis fine. pass aVertices? now we're cooking π
β VERTICESVIEW PUBLIC OPERATIONS β
virtual void Interpret(Command*)βVerticesViewinterpretsAlignToGridCmdto align its first vertex to the grid. just the first one. the rest follow, iykyk πvirtual void GetVertices(Coord*& x, Coord*& y, int& count)β returns the view's vertices in canvas coordinates. heads up though:GetVerticesallocates new arrays every single time it's called. every time. so like, don't call it in a loop unless you love memory management πVerticesComp* GetVerticesComp()β returns the subject. that's the whole job. slay π«Ά
π VERTICESVIEW PROTECTED OPERATIONS π
VerticesView(VerticesComp* = nil)β initializes aVerticesView, optionally supplying the subject. optional subject is optional πΈvirtual void CreateHandles()βVerticesViewredefinesCreateHandlesto create aRubberHandlesobject that draws a handle coinciding with each vertex. so every point gets its own little handle. cute, honestly β¨virtual boolean VertexChanged()β returns whether or not the vertices as stored in the view are different in any way from those stored in the subject. theUpdatefunction relies on this result to decide whether to recreate the view's structured graphic based on the subject's. here's the tea though:VerticesView::VertexChangedconservatively returnsfalseby default. subclasses should redefine this function to make a more discerning decision β which, in turn, increases the efficiency of the update operation. so like, default is safe-but-lazy, and you can do better π₯
π§ PSVERTICES PROTECTED OPERATIONS π§
PSVertices(VerticesComp* = nil)β initialize a PostScript external representation of the given subject, if any. "if any" is doing a lot of work there but okay πvirtual const char* Name()β subclasses should redefineNameto return the proper tag for the object in the PostScript output, as required foridrawcompatibility. don't skip this one, the tag matters fr fr π
π SEE ALSO π
GraphicComp(3U), GraphicView(3U), Grid(3U), PatternCmd(3U), PostScriptView(3U), Vertices(3U), align(3U), idraw(3I)
go read those next, bestie, they're all connected π¦
Unidraw Β· 23 January 1991 Β· VerticesComp(3U)
and that's the whole page!! mwah π this one came straight out of the Unidraw era, dated 23 January 1991, and it's still serving. go build something vertexed, you got this ππ
π¦ where this page comes from
- debian bookworm: ivtools-dev 2.0.11d.a1-1+b4
- debian trixie: ivtools-dev 2.0.11d.a1-3+b4
- ubuntu jammy: ivtools-dev 2.0.11d.a1-1build1
- ubuntu noble: ivtools-dev 2.0.11d.a1-3build1
- ubuntu questing: ivtools-dev 2.0.11d.a1-3build7
- ubuntu resolute: ivtools-dev 2.0.11d.a1-3build9
- ubuntu stonking: ivtools-dev 2.1.1+git.2025.07.26.a1-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms