lines(3U)

πŸ’– lines(3U) πŸ’–

okay so bestie β€” welcome to the InterViews Reference Manual page for lines(3U) and honestly? it's giving structured graphics royalty. no cap. πŸ‘‘


✨ NAME ✨

Point, Line, MultiLine, S_MultiLine, SF_MultiLine β€” structured graphics classes for points, lines, and open polygons. that's the whole squad right there. 🫢


πŸŽ€ SYNOPSIS πŸŽ€

#include <Unidraw/Graphic/lines.h>

like yes, that's the one line you need, and then you're in. πŸ’…


🌸 DESCRIPTION 🌸

okay so picture this: Point and Line are subclasses of Graphic that draw a point and a line, respectively. simple. iconic. they do exactly what they say on the tin. ✨

then we have MultiLine, which is a Vertices subclass and serves as an abstract base class for open polygons. she's the blueprint, not the finished product, and we respect her for that. πŸ¦‹

so like, S_MultiLine is a MultiLine subclass for stroked open polygons, while SF_MultiLine is a stroked-filled open polygon. two sisters, slightly different vibes. πŸ’–

and here's the tea on state: Point, Line, and S_MultiLine store a PSBrush, while SF_MultiLine also stores a PSPattern. she's got extra. she's got layers. we love that for her. 🌈


πŸ’… POINT PUBLIC OPERATIONS πŸ’…

  • Point(Coord x, Cord y, Graphic* = nil) β€” constructs a Point object, and optionally you can supply a graphic from which to obtain an initial set of graphics state. cute, flexible, we stan.
  • void GetOriginal(Coord&, Coord&) β€” returns the coordinates you supplied in the constructor. no guessing, she just tells you. πŸ’–

πŸ”₯ LINE PUBLIC OPERATIONS πŸ”₯

  • Line(Coord x0, Cord y0, Coord x1, Coord y1, Graphic* = nil) β€” constructs a Line object, optionally supplying a graphic from which to obtain an initial set of graphics state. yes, two endpoints, zero drama.
  • void GetOriginal(Coord& x0, Coord& y0, Coord& x1, Coord& y1) β€” returns the line's endpoints as supplied in the constructor. exactly as you left them, bestie. 🫢

🧚 MULTILINE PROTECTED OPERATIONS 🧚

  • MultiLine(Coord* x, Coord* y, int count, Graphic* = nil) β€” okay so MultiLine's constructor is protected, and that's on purpose: it prevents instantiation of the abstract base class. the parameters are passed directly to the Vertices constructor. she's not for direct use, she's for inheriting. periodt. πŸ’€

πŸ“ S_MULTILINE PUBLIC OPERATIONS πŸ“

  • S_MultiLine(Coord* x, Coord* y, int count, Graphic* = nil) β€” constructs an S_MultiLine object, optionally supplying a graphic from which to obtain an initial set of graphics state. stroked and serving. ✨

⭐ SF_MULTILINE PUBLIC OPERATIONS ⭐

  • SF_MultiLine(Coord* x, Coord* y, int count, Graphic* = nil) β€” constructs an SF_MultiLine object, optionally supplying a graphic from which to obtain an initial set of graphics state. stroked AND filled, main character energy fr fr. πŸ‘‘

πŸ¦‹ SEE ALSO πŸ¦‹

  • Graphic(3U)
  • Vertices(3U)
  • pspaint(3U)

go read those next, iykyk. πŸ“š


lowkey a heads-up: MultiLine's constructor being protected means you literally cannot instantiate the abstract base class. that's not a bug, that's the design. respect the boundary bestie. πŸ™ˆ

and that's the whole page, babe!! this one came from Unidraw, dated 2 February 1991 β€” yes she's vintage, yes she still ate, no notes. πŸ’œβœ¨