fuchsia.math

STRUCTS

Point

Defined in fuchsia.math/math.fidl

An integer position in a 2D cartesian space.

This type does not specify units. Protocols that use this type should specify the characteristics of the vector space, including orientation and units.

NameTypeDescriptionDefault
x int32 The number of units along the x-axis. No default
y int32 The number of units along the y-axis. No default

PointF

Defined in fuchsia.math/math.fidl

A floating point position in a 2D cartesian space.

This type does not specify units. Protocols that use this type should specify the characteristics of the vector space, including orientation and units.

NameTypeDescriptionDefault
x float32 The number of units along the x-axis. No default
y float32 The number of units along the y-axis. No default

Point3F

Defined in fuchsia.math/math.fidl

A floating point position in a 3D cartesian space.

This type does not specify units. Protocols that use this type should specify the characteristics of the vector space, including orientation and units.

NameTypeDescriptionDefault
x float32 The number of units along the x-axis. No default
y float32 The number of units along the y-axis. No default
z float32 The number of units along the z-axis. No default

Size

Defined in fuchsia.math/math.fidl

The integer dimensions of a rectangular region in a 2D cartesian space.

This type does not specify units. Protocols that use this type should specify the characteristics of the vector space, including orientation and units.

This type allows for negative dimensions, to which protocols can give semantics. Protocols that use this type should specify whether negative dimensions are meaningful, and, if they are meaningful, what they mean.

NameTypeDescriptionDefault
width int32 The distance along the x-axis. No default
height int32 The distance along the y-axis. No default

SizeF

Defined in fuchsia.math/math.fidl

The floating point dimensions of a rectangular region in a 2D cartesian space.

This type does not specify units. Protocols that use this type should specify the characteristics of the vector space, including orientation and units.

This type allows for negative dimensions, to which protocols can give semantics. Protocols that use this type should specify whether negative dimensions are meaningful, and, if they are meaningful, what they mean.

NameTypeDescriptionDefault
width float32 The distance along the x-axis. No default
height float32 The distance along the y-axis. No default

Rect

Defined in fuchsia.math/math.fidl

An integral, rectangular, axis-aligned region in a 2D cartesian space.

This type does not specify units. Protocols that use this type should specify the characteristics of the vector space, including orientation and units.

NameTypeDescriptionDefault
x int32 The location of the origin of the rectangle in the x-axis. No default
y int32 The location of the origin of the rectangle in the y-axis. No default
width int32 The distance along the x-axis. If `width` is positive, the region includes x values starting at `x` and increasing along the x-axis. If `width` is negative, the region includes x values starting at `x` and decreasing along the x-axis. No default
height int32 The distance along the y-axis. If `height` is positive, the region includes y values starting at `y` and increasing along the y-axis. If `height` is negative, the region includes y values starting at `y` and decreasing along the y-axis. No default

RectF

Defined in fuchsia.math/math.fidl

A floating point, rectangular, axis-aligned region in a 2D cartesian space.

This type does not specify units. Protocols that use this type should specify the characteristics of the vector space, including orientation and units.

NameTypeDescriptionDefault
x float32 The location of the origin of the rectangle in the x-axis. No default
y float32 The location of the origin of the rectangle in the y-axis. No default
width float32 The distance along the x-axis. If `width` is positive, the region includes x values starting at `x` and increasing along the x-axis. If `width` is negative, the region includes x values starting at `x` and decreasing along the x-axis. No default
height float32 The distance along the y-axis. If `height` is positive, the region includes y values starting at `y` and increasing along the y-axis. If `height` is negative, the region includes y values starting at `y` and decreasing along the y-axis. No default

RRectF

Defined in fuchsia.math/math.fidl

A floating point rounded rectangle with the custom radii for all four corners.

A region in a 2D cartesian space consisting of linear, axis-aligned sides with corners rounded into a quarter ellipse.

If the quarter ellipses in two corners would overlap, their radii are clamped such that the ellipses meet with an axis-aligned tangent.

This type does not specify units. Protocols that use this type should specify the characteristics of the vector space, including orientation and units.

NameTypeDescriptionDefault
x float32 The location of the origin of the region in the x-axis. No default
y float32 The location of the origin of the region in the y-axis. No default
width float32 The distance along the x-axis. If `width` is positive, the region includes x values starting at `x` and increasing along the x-axis. If `width` is negative, the region includes x values starting at `x` and decreasing along the x-axis. No default
height float32 The distance along the y-axis. If `height` is positive, the region includes y values starting at `y` and increasing along the y-axis. If `height` is negative, the region includes y values starting at `y` and decreasing along the y-axis. No default
top_left_radius_x float32 The radius of the quarter ellipse in the top-left corner along the x-axis. Must not be negative. No default
top_left_radius_y float32 The radius of the quarter ellipse in the top-left corner along the y-axis. Must not be negative. No default
top_right_radius_x float32 The radius of the quarter ellipse in the top-right corner along the x-axis. Must not be negative. No default
top_right_radius_y float32 The radius of the quarter ellipse in the top-right corner along the y-axis. Must not be negative. No default
bottom_left_radius_x float32 The radius of the quarter ellipse in the bottom-left corner along the x-axis. Must not be negative. No default
bottom_left_radius_y float32 The radius of the quarter ellipse in the bottom-left corner along the y-axis. Must not be negative. No default
bottom_right_radius_x float32 The radius of the quarter ellipse in the bottom-right corner along the x-axis. Must not be negative. No default
bottom_right_radius_y float32 The radius of the quarter ellipse in the bottom-right corner along the y-axis. Must not be negative. No default

Transform

Defined in fuchsia.math/math.fidl

A projective transformation of a 3D cartesian space.

A transform consists of a 4x4 matrix that operates in homogeneous coordinates. For example, a point located at (x, y, z) in the cartesian space is transformed by M to a point located at (x'/w', y'/w', z'/w'), where (x', y', z', w') = M (x, y, z, 1).

NameTypeDescriptionDefault
matrix float32[16] The entries in the transformation matrix in row major order. Specifically, if the matrix is as follows: ``` a b c d e f g h i j k l m n o p ``` then the entries in this array are `(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p)`. No default

Inset

Defined in fuchsia.math/math.fidl

An integer offset to apply to each edge of a rectangle.

This type does not specify units. Protocols that use this type should specify the characteristics of the vector space, including orientation and units.

NameTypeDescriptionDefault
top int32 The amount to move the top edge of the rectangle towards the center of the rectangle. No default
right int32 The amount to move the right edge of the rectangle towards the center of the rectangle. No default
bottom int32 The amount to move the bottom edge of the rectangle towards the center of the rectangle. No default
left int32 The amount to move the left edge of the rectangle towards the center of the rectangle. No default

InsetF

Defined in fuchsia.math/math.fidl

A floating point offset to apply to each edge of a rectangle.

This type does not specify units. Protocols that use this type should specify the characteristics of the vector space, including orientation and units.

NameTypeDescriptionDefault
top float32 The amount to move the top edge of the rectangle towards the center of the rectangle. No default
right float32 The amount to move the right edge of the rectangle towards the center of the rectangle. No default
bottom float32 The amount to move the bottom edge of the rectangle towards the center of the rectangle. No default
left float32 The amount to move the left edge of the rectangle towards the center of the rectangle. No default