pspaint(3U)

πŸ’– pspaint(3U) β€” bestie edition πŸ’–

okay so you're looking at pspaint(3U) from the InterViews Reference Manual, and honestly? it's giving glow-up era for graphics state objects. no cap.


✨ NAME ✨

PSBrush, PSColor, PSFont, PSPattern β€” graphics state objects with added PostScript information πŸŽ€


🌸 SYNOPSIS 🌸

#include <Unidraw/Graphic/pspaint.h>

πŸ¦‹ DESCRIPTION πŸ¦‹

so like. PSBrush, PSColor, PSFont, and PSPattern are subclasses of Brush, Color, Font, and Pattern respectively β€” they're the same girlies but with extra info stored on top. that extra info is literally what you need to generate idraw-compatible PostScript. and Unidraw's structured graphics objects use these subclasses exclusively. no substitutes, periodt. πŸ’…


πŸ’œ PSBRUSH PUBLIC OPERATIONS πŸ’œ

  • PSBrush()
  • PSBrush(int pattern, int width) β€” create an undefined PSBrush (that's the parameterless constructor, the "no thoughts head empty" one) or one that has the specified line pattern and width. ⚠️ heads up bestie: structured graphics with an undefined brush will not render their stroked portions. like, at all. it's not a vibe, it's a void. 😭
  • int GetLinePattern()
  • int Width() β€” hand back the brush parameters you gave the constructor. ty for your service 🫢
  • boolean None() β€” returns true if this is an undefined brush. it's the "are you even real" check ✨
  • const int* GetDashPattern()
  • int GetDashPatternSize()
  • int GetDashOffset() β€” return the values required to characterize the brush in PostScript. the equivalent PostScript dash pattern gets computed from the brush's line pattern, iykyk. 🌈

πŸŽ€ PSBRUSH PROTECTED OPERATIONS πŸŽ€

  • void CalcDashPat(int) β€” compute the equivalent PostScript dash pattern from the line pattern specified in the constructor. it's the math girlie doing the behind-the-scenes work 🧚

πŸ“ PSCOLOR PUBLIC OPERATIONS πŸ“

  • PSColor( Color_Intensity, Color_Intensity, Color_Intensity, const char* name ) β€” create a PSColor, supplying color intensity information and a name to associate with those intensities. πŸ’– lowkey important: the name is used solely to generate idraw-compatible PostScript. that's its whole job, its main character moment, nothing else.

⭐ PSFONT PUBLIC OPERATIONS ⭐

  • PSFont( const char* name, const char* PS_name, const char* PS_size ) β€” construct a PSFont, supplying the window-system-specified font name plus the corresponding PostScript font name and its size. three-for-one deal, we love to see it. πŸ‘‘
  • const char* GetName()
  • const char* GetPrintFont()
  • const char* GetPrintSize()
  • const char* GetPrintFontAndSize() β€” return the constructor-supplied parameters. and GetPrintFontAndSize returns the concatenation of the PostScript font name and its size, with a space interposed for legibility (a lil breathing room, she deserves it). ✨
  • int GetLineHt() β€” return an integer version of the PostScript font's size, exactly as it was supplied to the constructor. integer-ified. slay. πŸ”₯

🌈 PSPATTERN PUBLIC OPERATIONS 🌈

  • PSPattern()
  • PSPattern(int dither, float graylevel)
  • PSPattern(const int* pattern, int) β€” create an undefined PSPattern (the parameterless constructor, again the empty one 🫠), or one with specific dither and graylevel values, or one that replicates a pattern defined by the given array. ⚠️ and fr fr: structured graphics with an undefined pattern will not render their filled portions. nothing. nada. the fill is simply not happening. πŸ’€
  • boolean None() β€” returns true if this is an undefined pattern. vibe check: failed. πŸ™ˆ
  • float GetGrayLevel() β€” return the graylevel that the pattern approximates, if one was specified in the constructor. if you didn't give one, don't come asking. 😌
  • const int* GetData()
  • int GetSize() β€” return the array that defines the replicated pattern and its size, if the pattern was constructed with one. πŸŽ€

πŸ‘‘ SEE ALSO πŸ‘‘

idraw(1I), pspaint(3I), and the InterViews 3.1 reference manual β€” go read the whole family, they ate πŸ’–


that's the whole page bestie, and yes it was written by Unidraw on 2 February 1991 β€” an actual icon, an elder legend, we stan 🫢✨