struct ImageRect

Defined at line 57 of file ../../src/ui/scenic/lib/flatland/flatland_types.h

Represents an image rectangle, parameterized by an origin point, an extent representing the width

and height. The texel UV coordinates specify, in clockwise order, the unnormalized clockwise

texel coordinates beginning at the top-left coordinate (in texture-space). The orientation

specifies the rotation applied to the rect. Note that origin and extent are specified in the

new global coordinate-space (i.e. after all transforms have been applied).

TODO(https://fxbug.dev/446975761): consider replacing `orientation` with a `types::RotateFlip`

and `origin`/`extent` with a `types::RectangleF`. This is not completely trivial.

Public Members

tvec2 origin
tvec2 extent
array texel_uvs
Orientation orientation

Public Methods

bool operator== (const ImageRect & other)

Two `ImageRect` are identical if all of the following are true:

- orientations are identical

- texel_uvs are identical

- origins within epsilon-distance

- extents within epsilon-distance

Defined at line 40 of file ../../src/ui/scenic/lib/flatland/flatland_types.cc

void ImageRect (const glm::vec2 & origin, const glm::vec2 & extent, const std::array<glm::ivec2, 4> uvs, fuchsia::ui::composition::Orientation orientation)

Defined at line 58 of file ../../src/ui/scenic/lib/flatland/flatland_types.h

void ImageRect (const glm::vec2 & origin, const glm::vec2 & extent)

Creates an ImageRect with the specified width and height. |texel_uvs| are initialized using the

specified |extent| of the rectangle. Note that this may not be equal to the image you are

sampling from.

Defined at line 65 of file ../../src/ui/scenic/lib/flatland/flatland_types.h

void ImageRect ()

Defined at line 73 of file ../../src/ui/scenic/lib/flatland/flatland_types.h