transforms(3U)
β¨ transforms(3U) β¨
okay bestie, welcome to transforms from the InterViews Reference Manual π this is the Unidraw page that serves you MoveCmd, RotateCmd and ScaleCmd β the three coordinate transformation commands. and no, before you ask, this is not the "transforms" of your glow-up era, it's the geometry kind. still iconic tho π
πΈ NAME πΈ
MoveCmd, RotateCmd, ScaleCmd β coordinate transformation commands π
π¦ SYNOPSIS π¦
#include <Unidraw/Commands/transforms.h>
β¨ DESCRIPTION β¨
so the Unidraw library predefines three commands for doing coordinate transformations, and the vibe is that they're all purely interpretive β like, they're just out here defining the math, no cap π§
MoveCmdβ defines a translationRotateCmdβ defines a rotationScaleCmdβ defines a two-dimensional scaling
three little legends, one header file. periodt π
π MOVECMD PUBLIC OPERATIONS π
MoveCmd(ControlInfo*, float dx = 0, float dy = 0)
MoveCmd(Editor* = nil, float = 0, float = 0)
construct a brand new MoveCmd π«Ά you're handing it the translation distances in the horizontal dimension (dx) and the vertical dimension (dy). defaults are both 0, so if you say nothing it moves... nowhere. which is honestly so relatable π
void GetMovement(float&, float&)
returns the translation distances you specified back in the constructor. it's giving "what did I just say" but make it a function β¨
π ROTATECMD PUBLIC OPERATIONS π
RotateCmd(ControlInfo*, float = 0)
RotateCmd(Editor* = nil, float = 0)
construct a new RotateCmd π and you pass it the rotation angle in degrees. yes, degrees, not radians, we're not doing calculus at 2am bestie. default is 0, so no spin unless you ask for it π«
float GetRotation()
returns the rotation angle that you specified in the constructor. that's it, that's the whole function, and she ate π₯
π SCALECMD PUBLIC OPERATIONS π
ScaleCmd(ControlInfo*, float sx = 1, float sy = 1, Alignment = Center)
ScaleCmd(Editor* = nil, float = 1, float = 1, Alignment = Center)
construct a new ScaleCmd π¦ you give it the scaling factors in the horizontal dimension (sx) and the vertical dimension (sy), plus an alignment β and the alignment is basically a suggestion of the point about which the component should be scaled. the defaults are 1 and 1 (aka no change, no thoughts, head empty) and Alignment = Center because obviously we scale from the center, main character energy only π
void GetScaleing(float&, float&)
Alignment GetAlignment()
return the scaling factors and the alignment that you specified in the constructor. and yes, it really is spelled GetScaleing β that's the actual name in the source, we do not fix it, we do not touch it, we respect her journey π
π SEE ALSO π
Command(3U)β go read the parent class, it's the blueprint, iykyk π
β οΈ reminder bestie: all of these are purely interpretive commands β they define the transformation, they don't go around executing chaos on their own. know the difference, it matters fr fr π«Ά
okay that's the whole page!! this was the Unidraw edition, dated 24 January 1991, and it lives at transforms(3U) in the InterViews Reference Manual. mwah, slay, go transform something πβ¨πΈ
π¦ 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