Lore archive · Warcraft Wiki, 2023 dump
API TextureBase SetRotation
Last wiki revision 2023-08-16
Applies a rotation to the texture. TextureBase:SetRotation(radians [, normalizedRotationPoint])
- radians: - Rotation angle in radians. Positive values rotate the texture counter-clockwise.
- normalizedRotationPoint:
- The coordinates are in the image coordinate space: (0,0) is the top left corner of the image, (1,1) is the bottom right corner.
- This function doesn't quite rotate around the (cx, cy) point: for instance, asking for a zero-radian rotation around (-1, 0) makes the image vanish. The behavior is equivalent to performing the following sequence of affine transformations:
- Translate the image by (-cx, -cy)
- Scale the image by
- Rotate the image by around the origin.
- Translate the image by (0.5, 0.5)
- The scaling applied by this function ensures that a square image rotated by 45 degrees around its center fits within the Texture widget's bounding box. If you're rotating circular textures, you may wish to increase the texture widget's dimensions by a factor of to keep the original image size.
Source
https://warcraft.wiki.gg/wiki/API_TextureBase_SetRotation · retrieved 2023-11-13 · CC BY-SA 4.0
Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.
This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.