SplineComp(3U)

πŸ’… SplineComp πŸ’…

okay bestie, welcome to the InterViews Reference Manual, section 3U β€” this is the Unidraw corner of the library and we're talking splines today. open ones, closed ones, the views that show them, and the PostScript glow-ups that write them out. slay. ✨


🌸 NAME 🌸

SplineComp, SplineView, PSSpline, ClosedSplineComp, ClosedSplineView, PSClosedSpline β€” open and closed spline component subjects, views, and PostScript external representations. that's the whole squad fr fr 🫢


πŸŽ€ SYNOPSIS πŸŽ€

#include <Unidraw/Components/spline.h>

πŸ¦‹ DESCRIPTION πŸ¦‹

So SplineComp and ClosedSplineComp are VerticesComps that define open and closed splines, respectively. SplineComp uses an SFH_OpenBSpline graphic to store its graphical attributes, while ClosedSplineComp uses an SFH_ClosedBSpline. no cap, that's the whole difference in vibe.

SplineView and ClosedSplineView are VerticesViews for displaying open and closed splines β€” they're the ones doing the showing off on screen. πŸ’

PSSpline and PSClosedSpline are PSVertices that externalize their subject's information in PostScript form. they take the whole thing and translate it into printer language. iconic behaviour honestly. πŸ–¨οΈ


πŸ‘‘ SPLINECOMP PUBLIC OPERATIONS πŸ‘‘

  • SplineComp(SFH_OpenBSpline* = nil) β€” the constructor, bestie. it takes an optional control point hit-detecting stroked-filled open B-spline graphic that defines the attributes of the spline. optional means you can just not, and it'll be nil. πŸ’–
  • SFH_OpenBSpline* GetSpline() β€” returns the SFH_OpenBSpline graphic that defines the spline's attributes.
real talk: GetSpline is simply a more specific form of the GetGraphic operation. same energy, more ✨specific✨.

🌈 SPLINEVIEW PUBLIC OPERATIONS 🌈

  • SplineView(SplineComp* = nil) β€” create a SplineView, optionally supplying the subject. you can hand it the spline or let it figure itself out. πŸŽ€
  • virtual Manipulator* CreateManipulator(Viewer*, Event&, Transformer*, Tool*)
  • virtual void InterpretManipulator(Manipulator*)

so SplineView redefines its response to manipulation with a GraphicCompTool. here's the lore: 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 β€” yes, gravity, that's a whole thing. πŸͺ

SplineView also defines a response to the ReshapeTool, allowing the user to click on one of its control points to reposition it. and the plot twist: the subject is actually replaced (via ReplaceCmd) with a new SplineComp subject reflecting the repositioned control point. repositioning will be influenced by gravity too. not me being dramatic about a control point πŸ’€

  • SplineComp* GetSplineComp() β€” return the subject. simple. clean. slay.

⭐ PSSPLINE PUBLIC OPERATIONS ⭐

  • PSSpline(SplineComp* = nil) β€” construct a PostScript external representation of the given subject, if any.

πŸ’œ PSSPLINE PROTECTED OPERATIONS πŸ’œ

  • virtual const char* Name() β€” PSSpline identifies itself as "BSpl" in the PostScript output. that's its little signature, its whole brand. πŸ’…

πŸ“ CLOSEDSPLINECOMP PUBLIC OPERATIONS πŸ“

  • ClosedSplineComp(SFH_ClosedBSpline* = nil) β€” the constructor takes an optional control point hit-detecting stroked-filled closed B-spline graphic that defines the attributes of the closed spline. yes, closed, we said what we said. 🫢
  • SFH_ClosedBSpline* GetClosedSpline() β€” return the SFH_ClosedBSpline graphic that defines the closed spline's attributes.
and again, for the people in the back: GetClosedSpline is simply a more specific form of the GetGraphic operation. ✨

🧚 CLOSEDSPLINEVIEW PUBLIC OPERATIONS 🧚

  • ClosedSplineView(ClosedSplineComp* = nil) β€” create a ClosedSplineView, optionally supplying the subject.
  • virtual Manipulator* CreateManipulator(Viewer*, Event&, Transformer*, Tool*)
  • virtual void InterpretManipulator(Manipulator*)

ClosedSplineView 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. we love consistency. πŸ’–

ClosedSplineView also defines a response to the ReshapeTool, allowing the user to click on one of its control points to reposition it. the subject is actually replaced (via ReplaceCmd) with a new ClosedSplineComp subject reflecting the repositioned control point. repositioning will be influenced by gravity. periodt. πŸ’…

  • ClosedSplineComp* GetClosedSplineComp() β€” return the subject. that's it, that's the function.

🌸 PSCLOSEDSPLINE PUBLIC OPERATIONS 🌸

  • PSClosedSpline(ClosedSplineComp* = nil) β€” construct a PostScript external representation of the given subject, if any.

πŸ”₯ PSCLOSEDSPLINE PROTECTED OPERATIONS πŸ”₯

  • virtual const char* Name() β€” PSClosedSpline identifies itself as "CBSpl" in the PostScript output. different spline, different name tag. πŸŽ€

πŸ’€ 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), splines(3U) β€” go read those too bestie, iykyk. πŸ“š


and that's the page!! brought to you by Unidraw, dated 23 January 1991 β€” yes it's giving vintage, yes it still ate, and yes, the original footer says SplineComp(3U) at both ends because the manual is a little symmetrical like that. πŸ«ΆπŸ’–βœ¨ bye bestie, go draw a spline πŸ¦‹