Rect
The location and size of a rectangle region.
The width and height of a #graphene_rect_t can be negative; for instance, a #graphene_rect_t with an origin of 0, 0 and a size of 10, 10 is equivalent to a #graphene_rect_t with an origin of 10, 10 and a size of -10, -10 .
Application code can normalize rectangles using graphene_rect_normalize(); this function will ensure that the width and height of a rectangle are positive values. All functions taking a #graphene_rect_t as an argument will internally operate on a normalized copy; all functions returning a #graphene_rect_t will always return a normalized rectangle.
Skipped during bindings generation
parameter
vertices
: vertices: Out parameter is not supportedfield
origin
: Field with not-pointer record/union graphene_point_t is not supportedfield
size
: Field with not-pointer record/union graphene_size_t is not supported
Since
1.0
Constructors
Functions
Checks whether a #graphene_rect_t contains the given coordinates.
Checks whether a #graphene_rect_t fully contains the given rectangle.
Retrieves the coordinates of the bottom-left corner of the given rectangle.
Retrieves the coordinates of the bottom-right corner of the given rectangle.
Retrieves the coordinates of the top-left corner of the given rectangle.
Retrieves the coordinates of the top-right corner of the given rectangle.
Initializes @r using the given @src rectangle.
Linearly interpolates the origin and size of the two given rectangles.
Computes the intersection of the two given rectangles.
Normalizes the passed rectangle.
Rounds the origin and size of the given rectangle to their nearest integer values; the rounding is guaranteed to be large enough to have an area bigger or equal to the original rectangle, but might not fully contain its extents. Use graphene_rect_round_extents() in case you need to round to a rectangle that covers fully the original one.
Rounds the origin of the given rectangle to its nearest integer value and and recompute the size so that the rectangle is large enough to contain all the conrners of the original rectangle.
Rounds the origin and the size of the given rectangle to their nearest integer values; the rounding is guaranteed to be large enough to contain the original rectangle.