LavaUI docs

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:371

Cases

case none

Not documented.

Sources/LavaUI/Image.swift:372

case clockwise

Not documented.

Sources/LavaUI/Image.swift:373

case half

Not documented.

Sources/LavaUI/Image.swift:374

case anticlockwise

Not documented.

Sources/LavaUI/Image.swift:375