Picture(3U)

✨ Picture(3U) ✨

okay bestie, welcome to the InterViews Reference Manual πŸ’– you're reading about Picture, a composite structured graphic, and honestly? she's the friend who organizes the whole group chat. πŸŽ€


🌸 NAME 🌸

Picture β€” a composite structured graphic πŸ¦‹


✨ SYNOPSIS ✨

#include <Unidraw/Graphic/picture.h>

πŸ’… DESCRIPTION πŸ’…

So like, a Picture defines a composition of graphic objects. Think of it as the group chat and the children as the members β€” the picture runs the whole vibe. 🫢

A picture has its own graphics state, and it concatenates that state with its children's state when it is drawn or erased. No cap.

Picture adopts the default concatenation semantics supported by the Graphic base class: the picture's graphics state effectively overrides its children's, so that they are drawn with the picture's state information substituted for their own. A child's attribute is used only when the picture does not already define it. It's giving main character energy, and honestly, the picture is the main character. πŸ‘‘

Moreover, each child's transformer is postmultiplied by the picture's transformer when the picture is drawn; thus children are drawn relative to the picture's coordinate system. iykyk. 🌈


πŸ‘‘ PUBLIC OPERATIONS πŸ‘‘

  • Picture(Graphic* = nil) β€” Construct a new picture, and optionally supply a graphic from which to copy an initial set of graphics state. Picture is derived from FullGraphic and therefore defines a full set of graphics state. ✨
  • virtual ~Picture() β€” The picture deletes its children when it is deleted. 😭 she takes everyone with her, fr fr.
  • boolean IsEmpty() β€” Picture defines IsEmpty in addition to the standard Graphic child traversal operations, to provide a convenient way to check if the picture has any children. vibe check on the children, basically. 🧚

πŸ”’ PROTECTED OPERATIONS πŸ”’

  • Graphic* graphic(UList*)
  • UList* Elem(Iterator)

Convenience functions for extracting a graphic from a UList element and a UList from an iterator. lowkey the little helper besties. πŸ’œ


πŸ¦‹ SEE ALSO πŸ¦‹

Graphic(3U), Iterator(3U), Transformer(3I), UList(3U), pspaint(3U) πŸ’–


quick reminder babe: this whole page is straight from the Unidraw manual, dated 1 February 1991. periodt. πŸ’…βœ¨ go read those SEE ALSOs, they're iconic. πŸŽ€πŸŒΈπŸ’–