StencilComp(3U)

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

okay bestie, welcome to the InterViews Reference Manual β€” yes that's the manual we're in, and yes this page is a whole vibe. sit down, hydrate, let's talk about bitmaps πŸ¦‹


✨ NAME ✨

StencilComp, StencilView, PSStencil β€” three icons in one page, no cap. They're a bitmap component subject, its view, and its PostScript external representation. The holy trinity of "draw a picture and then print it" πŸ’…


✨ SYNOPSIS ✨

#include <Unidraw/Components/stencilcomp.h>

that's it. that's the whole incantation. go off πŸŽ€


✨ DESCRIPTION ✨

So StencilComp is a GraphicComp that represents a bitmapped image. It uses a Stencil graphic to store its graphical attributes β€” like, the Stencil is the personality, the comp is the person, yk? 🌸

StencilView is a GraphicView, and its whole job is displaying that bitmapped image. main character energy for real.

PSStencil is a PostScriptView that externalizes the subject's information in PostScript form. it's giving "translator for the printer" ✨


✨ STENCILCOMP PUBLIC OPERATIONS ✨

  • StencilComp(Stencil* = nil, const char* filename = nil) β€” the constructor, bestie. it takes an optional Stencil structured graphic that defines the attributes of the bitmapped image. you can also hand it an optional file name to associate the component with a file containing the (copious) image data. and yes, the word "copious" is doing a lot of work there β€” that image data is THICC 😭
  • Stencil* GetStencil() β€” returns the Stencil graphic that defines the stencil's attributes. lowkey it's just a more specific form of the GetGraphic operation. same energy, more precision πŸŽ€
  • const char* GetFileName() β€” returns the file name you specified in the constructor, if any. if you didn't pass one, well... it just says nothing. iconic of it honestly πŸ™ˆ

✨ STENCILVIEW PUBLIC OPERATIONS ✨

  • StencilView(StencilComp* = nil) β€” creates a StencilView, and you can optionally supply the subject while you're at it. builder behavior fr fr πŸ’…
  • StencilComp* GetStencilComp() β€” returns the subject. that's it. short, sweet, slay πŸ‘‘

✨ PSSTENCIL PUBLIC OPERATIONS ✨

  • PSStencil(StencilComp* = nil) β€” constructs a PostScript external representation of the given subject, if any. if there's no subject... there's no subject. no notes 🫢

✨ SEE ALSO ✨

  • GraphicComp(3U)
  • GraphicView(3U)
  • PostScriptView(3U)
  • Stencil(3U)

go read those too, bestie, they're the friend group 🌈


πŸ’€ reminder that this whole thing lives in Unidraw/Components/stencilcomp.h β€” don't go looking in the wrong header, i'm begging πŸ™

this page was brought to you by Unidraw, dated 10 August 1991 β€” yeah she's vintage, she's an antique, and she still ate πŸ’œβœ¨