Shape(3I)
π Shape(3I) β like, the vibe of a canvas π
okay bestie, so this is the InterViews Reference Manual page for Shape, and it's lowkey one of the most foundational lil guys in the whole toolkit. let's get into it π«Ά
β¨ NAME β¨
Shape β what shape a canvas should have πΈ
π SYNOPSIS π
#include <InterViews/shape.h>
π¦ DESCRIPTION π¦
So. A shape specifies the desired characteristics of a canvas. That's it, that's the whole job description. π
An interactor should set the fields of its shape when it is reconfigured, and it should call Change on its parent if any of these fields change. yes, tell your parent, communication is key in every relationship bestie π
The dimensions of a shape are defined by a "natural" size, a stretch amount, and a shrink amount. The width and height fields indicate the desired sizes. The hstretch, vstretch, hshrink, vshrink fields define how flexible these desired sizes are. fr fr, it's giving β¨flexibleβ¨
For example (and this example ate, ngl): an interactor may have a natural size of 100, but can adequately handle any size between 50 and 200. The stretchability for this case would be 100 and the shrinkability 50. math is mathing π
The constants hfil and vfil are provided to indicate "infinite" stretching or shrinking. They are represented as very large numbers and manipulated exactly the same as other stretch and shrink parameters. no special treatment, they're just like everyone else π₯°
The aspect field specifies the desired aspect ratio. A value of zero means any aspect is acceptable β go off, be free, no notes.
The hunits and vunits fields indicate that the canvas dimensions should be multiples of some values. multiples, bestie. it's giving grid energy π
π PUBLIC OPERATIONS π
Shape()β Construct a new shape with undefined natural size and infinite stretchability and shrinkability in both directions. a blank canvas, literally and figuratively π¨boolean Defined()andboolean Undefined()β Test if the shape's natural size is defined or not. yes or no, iconic or unknown πvoid Rect(int width, int height)andvoid Square(int side)β Short-hand for setting the dimensions of the shape.Squaresets both dimensions tosideand sets the aspect ratio to one. equal sides, equal rights, periodt πͺvoid Rigid(int hshrink, int hstretch, int vshrink, int vstretch)andvoid Rigid()β Set the stretchability and shrinkability fields of the shape. If no arguments are specified, the fields are set to zero. zero flexibility, zero chill, rigid is rigid πvoid SetUndefined()β Reset the shape's natural size to be undefined. back to square one (but notSquareone, don't get it twisted π)
π SEE ALSO π
Interactor(3I)Scene(3I)
and that's the whole page bestie!! π this was the InterViews manual, 15 June 1987 β yes it's vintage, yes it still serves, iykyk β¨ slay, go set some shape fields, and remember: if anything changes, call Change on your parent. communication queen behavior only πππ¦
π¦ where this page comes from
- debian bookworm: ivtools-dev 2.0.11d.a1-1+b4
- debian trixie: ivtools-dev 2.0.11d.a1-3+b4
- ubuntu jammy: ivtools-dev 2.0.11d.a1-1build1
- ubuntu noble: ivtools-dev 2.0.11d.a1-3build1
- ubuntu questing: ivtools-dev 2.0.11d.a1-3build7
- ubuntu resolute: ivtools-dev 2.0.11d.a1-3build9
- ubuntu stonking: ivtools-dev 2.1.1+git.2025.07.26.a1-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms