OrientationTransform class
Maps between an image’s raw (as-decoded) pixel space and the oriented space the viewer sees after an ImageOrientation is applied.
public static class OrientationTransformPublic Members
Section titled “Public Members”| name | description |
|---|---|
| static CreateOrientedToRawMatrix(…) | Builds the inverse of CreateRawToOrientedMatrix, mapping oriented coordinates back to raw. |
| static CreateRawToOrientedMatrix(…) | Builds the raw-to-oriented affine transform for an image of the given raw size; entries are 0 or ±1 plus a width/height translation, so the transform is exact for integer pixel coordinates. |
| static GetOrientedSize(…) | Returns the size of the image in oriented space, with width and height swapped for quarter turns. |
| static Normalize(…) | Normalizes an unknown/invalid value to Normal. |
| static OrientedToRaw(…) | Maps an oriented coordinate back to raw pixel space. (2 methods) |
| static RawToOriented(…) | Maps a raw pixel coordinate to oriented space. (2 methods) |
| static SwapsWidthHeight(…) | Returns whether the orientation is a quarter turn or diagonal reflection, so the oriented size swaps width and height relative to the raw size. |
Remarks
Section titled “Remarks”Every consumer that honors orientation (layout, view box, alignment, hit and pixel lookup) goes through this single source of truth so the forward and inverse directions cannot drift apart. Matrices follow the Matrix3x2) convention and map the raw image box [0,w] x [0,h] onto the oriented box anchored at the origin. The transforms are pure 90-degree rotations and axis flips, so they map axis-aligned rectangles to axis-aligned rectangles exactly.
See Also
Section titled “See Also”- namespace Aprillz.MewUI.Resources