enum ImageTurn
Swift
enum ImageTurn
A quarter turn applied to an image as it is decoded.
Clockwise, and a direction rather than an angle because that is what the two buttons on a viewer's bar mean.
It belongs to the decode, not to the drawing, and that is the whole reason it exists as a parameter: a compositor client has no GPU and no codec, so a picture it turned itself would have to be encoded, sent through shared memory and decoded again — a second copy of every picture and seconds of work for a large one. Asking the thing that is already decoding costs one pass over a buffer that is already there.
Part of a texture's identity, like maxPixelSize: the same photograph
upright and turned is two textures.
Sources/LavaUI/Image.swift:403
Cases
case none
Upright, as decoded (after the file's own EXIF orientation).
Sources/LavaUI/Image.swift:405
case clockwise
A quarter turn clockwise.
Sources/LavaUI/Image.swift:407
case half
Upside down.
Sources/LavaUI/Image.swift:409
case anticlockwise
A quarter turn anticlockwise.
Sources/LavaUI/Image.swift:411