special-draw-transform
v1.0.0
Published
special-draw-transform ======================
Downloads
2
Readme
special-draw-transform
An efficient way to apply simple transformations (any combination of mirroring and rotation by multiples of 90 degrees.)
GSpecialSessionModifier *
graphics_special_draw_create_transform_modifier(
GRect area, GSpecialTransformationType type);
Creates a transform modifier. Supply any of the following
GSpecialTransformationType
s:
GSpecialTransformMirrorYR270
GSpecialTransformRotate90
GSpecialTransformRotate270
GSpecialTransformMirrorYR90
GSpecialTransformIdentity [does nothing; included for completeness.]
GSpecialTransformMirrorX
GSpecialTransformMirrorY
GSpecialTransformRotate180
Rotation must be supplied with a square area.
Technical details
Uses 2×2 linear transformation matrices in which only -1, 0, and 1 are
supported. Two fields must be 0 diagonally. All of the 8 possible combinations
are already predefined as a GSpecialTransformationType
.
If you'd like to extend these abilities, please open an issue or PR!