RectComp(3U)
π RectComp(3U) π
okay bestie, welcome to the InterViews Reference Manual β today's main character is the rectangle. Yes, that rectangle. Sit down, hydrate, we're doing this. β¨
πΈ NAME πΈ
RectComp, RectView, PSRect β the rectangle component subject, its view, and its PostScript external representation. Three icons, one page. π
π SYNOPSIS π
#include <Unidraw/Components/rect.h>
that's it. that's the whole synopsis. go off, include line. π
π¦ DESCRIPTION π¦
so like, RectComp is a GraphicComp that defines a rectangle β no cap, that's literally its whole job description. It uses an SF_Rect graphic to store its graphical attributes, iykyk. π
Then we got RectView, which is a GraphicView for displaying the rectangle. She's the one doing the visual labor. β¨
And PSRect? She's a PostScriptView that externalizes the subject's information in PostScript form. Very "i speak fluent printer" of her. π¨οΈπ
π RECTCOMP PUBLIC OPERATIONS π
RectComp(SF_Rect* = nil)β the constructor, and she takes an optional stroked-filled rectangle that defines the attributes of the rectangle. Optional! So you can just show up with nothing and she'll still hold it down. π«ΆSF_Rect* GetRect()β returns theSF_Rectgraphic that defines the rectangle's attributes. And lowkey,GetRectis simply a more specific form of theGetGraphicoperation. same energy, cuter name. β¨
π RECTVIEW PUBLIC OPERATIONS π
RectView(RectComp* = nil)β create aRectView, and you can optionally supply the subject if you're feeling generous. πvirtual void Interpret(Command*)βRectViewinterpretsAlignToGridCmdto align its lower-left to the grid. lower-left stays booked and busy on the grid, periodt. πvirtual Manipulator* CreateManipulator(Viewer*, Event&, Transformer*, Tool*)β no extra tea to spill here, she just makes a manipulator. β¨virtual void InterpretManipulator(Manipulator*)β okay this one is a lot, buckle up bestie.RectViewredefines its response to manipulation with aGraphicCompTool.GraphicCompToolwill let the user sweep out a rectangle that reflects theRectComp's size. Creation will be influenced by gravity, if any β yes, gravity, she's got pull. π
RectView also defines a response to the ReshapeTool, allowing the user to click on one of its corners to reposition it. And plot twist: the subject is actually replaced (via ReplaceCmd) with a PolygonComp subject reflecting the repositioned corner. Repositioning will be influenced by gravity. not me gasping β the rectangle becomes a polygon?? character development fr fr. π
virtual void GetCorners(Coord*, Coord*)βGetCornerstakes two arrays of fourCoordvalues and stores into them the coordinates of its corners, in canvas coordinates. four corners, two arrays, zero ambiguity. πRectComp* GetRectComp()β returns the subject. short king of a function. π
π§ RECTVIEW PROTECTED OPERATIONS π§
virtual void CreateHandles()βRectViewredefinesCreateHandlesto use aRubberHandlesobject with four handles, one at each corner of the rectangle. four handles, four corners, symmetry slay. π
β PSRECT PUBLIC OPERATIONS β
PSRect(RectComp* = nil)β construct a PostScript external representation of the given subject, if any. if any!! optional again, she's chill like that. π¦
π SEE ALSO π
GraphicComp(3U)GraphicCompTool(3U)GraphicView(3U)Grid(3U)PolygonComp(3U)PostScriptView(3U)ReshapeTool(3U)align(3U)edit(3U)polygons(3U)
ngl the wholeUnidrawsaga is dated 22 January 1991 and this page is stampedRectComp(3U), so go read the whole family. the lore is deep, bestie. π
that's the page!! go sweep out a rectangle, mind the gravity, and stan responsibly. mwah. πβ¨π
π¦ 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