LineComp(3U)

✨ LineComp(3U) ✨

okay bestie, so this is a page from the InterViews Reference Manual β€” yeah, the fancy one. It's all about LineComp, LineView, PSLine, MultiLineComp, MultiLineView, and PSMultiLine β€” i.e. the line and multiline component subject, view, and PostScript external representation. Lines!! iconic. πŸ’…


🌸 SYNOPSIS 🌸

#include <Unidraw/Components/line.h>

πŸ¦‹ DESCRIPTION πŸ¦‹

LineComp is a GraphicComp that defines a line. It uses an Line graphic to store its graphical attributes. LineView is a GraphicView for displaying the line. PSLine is a PostScriptView that externalizes the subject's information in PostScript form.

The MultiLine counterparts of these classes define the component and external representation for a contiguous set of line segments, i.e., an open polygon. MultiLineComp is derived from VerticesComp, MultiLineView is a VerticesView, and PSMultiLine is a PSVertices. slay. πŸ‘‘


πŸ’– LINECOMP PUBLIC OPERATIONS πŸ’–

  • LineComp(Line* = nil) β€” the constructor, bestie. Takes an optional line graphic that defines the attributes of the line.
  • virtual void Interpret(Command*) β€” LineComp redefines Interpret to ignore PatternCmds. yeah. it just does not care. πŸ™ˆ
  • Line* GetLine() β€” returns the Line graphic that defines the line's attributes. GetLine is simply a more specific form of the GetGraphic operation. iykyk πŸ’…

✨ LINEVIEW PUBLIC OPERATIONS ✨

  • LineView(LineComp* = nil) β€” create an LineView, optionally supplying the subject. πŸŽ€
  • virtual void Interpret(Command*) β€” LineView interprets AlignToGridCmd to align its first endpoint to the grid. snapping, but make it fashion ✨
  • virtual Manipulator* CreateManipulator(
virtual Manipulator* CreateManipulator(
   Viewer*, Event&, Transformer*, Tool*
)
  • virtual void InterpretManipulator(Manipulator*) β€” LineView redefines its response to manipulation with a GraphicCompTool. The user clicks to specify the first endpoint of the line and then drags to position remaining endpoint. The endpoints will be constrained by gravity, if any. LineView also defines a response to the ReshapeTool, allowing the user to click on one of its endpoints to reposition it. The subject is actually replaced (via ReplaceCmd) with a new LineComp subject reflecting the repositioned endpoint. Repositioning will be influenced by gravity. gravity really said "i live here now" 🌈
  • virtual void GetEndpoints(Coord&, Coord&, Coord&, Coord&) β€” return the line's endpoints, in canvas coordinates. 🫢
  • LineComp* GetLineComp() β€” return the subject. periodt. πŸ’œ

🌸 LINEVIEW PROTECTED OPERATIONS 🌸

  • virtual void CreateHandles() β€” LineView redefines CreateHandles to use a RubberHandles object with two handles, one at each endpoint of the line. two little besties holding the line together fr fr πŸŽ€

πŸ’œ PSLINE PUBLIC OPERATIONS πŸ’œ

  • PSLine(LineComp* = nil) β€” construct a PostScript external representation of the given subject, if any. πŸ¦‹

⭐ MULTILINECOMP PUBLIC OPERATIONS ⭐

  • MultiLineComp(SF_MultiLine* = nil) β€” the constructor takes an optional stroked-filled multiline graphic that defines the attributes of the multiline.
  • SF_MultiLine* GetMultiLine() β€” return the MultiLine graphic that defines the multiline's attributes. GetMultiLine is simply a more specific form of the GetGraphic operation. no cap πŸ’…

πŸ”₯ MULTILINEVIEW PUBLIC OPERATIONS πŸ”₯

  • MultiLineView(MultiLineComp* = nil) β€” create an MultiLineView, optionally supplying the subject. ✨
  • virtual Manipulator* CreateManipulator(
virtual Manipulator* CreateManipulator(
   Viewer*, Event&, Transformer*, Tool*
)
  • virtual void InterpretManipulator(Manipulator*) β€” MultiLineView redefines its response to manipulation with a GraphicCompTool. The user clicks the left mouse button to specify each vertex and clicks with the middle mouse button to specify the final vertex. Vertex positioning will be constrained by gravity, if any. MultiLineView also defines a response to the ReshapeTool, allowing the user to click on one of its vertices to reposition it. The subject is actually replaced (via ReplaceCmd) with a new MultiLineComp subject reflecting the repositioned vertex. Repositioning will be influenced by gravity. yes bestie, gravity again. it's giving main character energy 🌈
  • MultiLineComp* GetMultiLineComp() β€” return the subject. 🫢

🌈 PSMULTILINE PUBLIC OPERATIONS 🌈

  • PSMultiLine(MultiLineComp* = nil) β€” construct a PostScript external representation of the given subject, if any. πŸ’–

πŸŽ€ PSMULTILINE PROTECTED OPERATIONS πŸŽ€

  • virtual const char* Name() β€” PSMultiLine identifies itself as "MLine" in the PostScript output. that's her name, don't wear it out πŸ’…

πŸ‘‘ SEE ALSO πŸ‘‘

Event(3I), GraphicComp(3U), GraphicCompTool(3U), GraphicView(3U), Grid(3U), PatternCmd(3U), PostScriptView(3U), ReshapeTool(3U), Rubband(3I), Transformer(3I), VerticesComp(3U), Viewer(3U), align(3U), edit(3U), lines(3U)


k that's the whole thing, you ate that fr fr πŸ’– this was Unidraw's page, dated 22 January 1991 β€” yeah she's vintage, she's iconic, we love her. bye bestie, go draw some lines πŸ¦‹βœ¨