the origin of the rectangle
the size of the rectangle
Rounds the origin of rect
downwards to the nearest integer, and rounds
the size of rect
upwards to the nearest integer, so that rect
is
updated to the smallest rectangle capable of fully containing the
original, fractional rectangle.
Frees the resources allocated by rect
.
Retrieves the height of rect
.
Retrieves the width of rect
.
Retrieves the X coordinate of the origin of rect
.
Retrieves the Y coordinate of the origin of rect
.
Normalizes the rect
and offsets its origin by the d_x
and d_y
values;
the size is adjusted by (2 * d_x,
2 * d_y)
.
If d_x
and d_y
are positive the size of the rectangle is decreased; if
the values are negative, the size of the rectangle is increased.
If the resulting rectangle has a negative width or height, the size is set to 0.
an horizontal value; a positive d_x
will create an inset rectangle, and a negative value will create a larger rectangle
a vertical value; a positive d_x
will create an inset rectangle, and a negative value will create a larger rectangle
Computes the intersection of a
and b,
and places it in res,
if res
is not %NULL.
This function will normalize both a
and b
prior to computing their
intersection.
This function can be used to simply check if the intersection of a
and b
is not empty, by using %NULL for res
.
Normalizes a #ClutterRect.
A #ClutterRect is defined by the area covered by its size; this means that a #ClutterRect with #ClutterRect.origin in [ 0, 0 ] and a #ClutterRect.size of [ 10, 10 ] is equivalent to a #ClutterRect with #ClutterRect.origin in [ 10, 10 ] and a #ClutterRect.size of [ -10, -10 ].
This function is useful to ensure that a rectangle has positive width
and height; it will modify the passed rect
and normalize its size.
Offsets the origin of rect
by the given values, after normalizing
the rectangle.
the horizontal offset value
the vertical offset value
The location and size of a rectangle.
The width and height of a #ClutterRect can be negative; Clutter considers a rectangle with an origin of [ 0.0, 0.0 ] and a size of [ 10.0, 10.0 ] to be equivalent to a rectangle with origin of [ 10.0, 10.0 ] and size of [ -10.0, -10.0 ].
Application code can normalize rectangles using clutter_rect_normalize(): this function will ensure that the width and height of a #ClutterRect are positive values. All functions taking a #ClutterRect as an argument will implicitly normalize it before computing eventual results. For this reason it is safer to access the contents of a #ClutterRect by using the provided API at all times, instead of directly accessing the structure members.