All Classes |Grouped Classes |Index

Class CL_Rectf

2D (left,top,right,bottom) rectangle structure - Float More...

Derived from:

public CL_Rectx< fl &t >

Derived by:

None

Group:

Math (Core)

#include <ClanLib/core.h>

Class Members:

Construction:

operator==

Rect == Rect operator.

operator!=

Rect != Rect operator.


Attributes:

get_width

Returns the width of the rectangle.

get_height

Returns the height of the rectangle.

get_size

Returns the size of the rectangle.

contains

Returns true if the rectangle contains the point.

get_top_left

Returns the top-left point of the rectangle.

get_top_right

Returns the top-right point of the rectangle.

get_bottom_right

Returns the bottom-right point of the rectangle.

get_bottom_left

Returns the bottom-left point of the rectangle.

is_overlapped

Returns true if rectangle passed is overlapping or inside this rectangle.

is_inside

Returns true if rectangle passed is inside this rectangle.

get_rot_bounds

Returns another CL_Rectx containingated ve veon of of th this one.

get_center

Returns the center point of the rectangle.

left

X1-coordinate.

top

Y1-coordinate.

right

X2-coordinate.

bottom

Y2-coordinate.


Operations:

set_top_left

Sets the top-left point of the rectangle.

set_top_right

Sets the top-right point of the rectangle.

set_bottom_right

Sets the bottom-right point of the rectangle.

set_bottom_left

Sets the bottom-left point of the rectangle.

set_width

Sets the width of the rectangle.

set_height

Sets the height of the rectangle.

shrink

Shrink the rectangle.

expand

Expand the rectangle.

translate

Translate the rect.

set_size

Sets the size of the rectangle, maintaining top/left position.

overlap

Calculates the intersection of two rectangles.

bounding_rect

Calculates the bounding rectangle of the rectangles.

normalize

Normalize rectangle. Ensures that left is less than right and top is less than bottom.

apply_alignment

Applies an origin and offset pair to this rectangle.

clip

Clip according to the specified clip rectangle.

CL_Rectf