dg2d.rect

Scalar and integer 2D rect types.

Members

Functions

combine
IRect combine(IRect a, IRect b)

Returns the union of a and b

combine
Rect combine(Rect a, Rect b)

Returns the union of two Rects

inset
Rect inset(Rect rect, Scalar delta)

Returns rect inset by delta.

intersect
IRect intersect(IRect a, IRect b)

Returns the insection of a and b

intersect
Rect intersect(Rect a, Rect b)

Returns the intersection of two Rects

offset
IRect offset(IRect rect, int x, int y)

Returns rect offset by x,y

offset
IRect offset(IRect rect, IPoint p)

Returns rect offset by p

offset
Rect offset(Rect rect, Scalar x, Scalar y)

Returns rect offset by x,y

offset
Rect offset(Rect rect, Point point)

Returns rect offset by point

ordered
Rect ordered(Rect rect)

Returns rect ordered so x0 < x1 and y0 < y1

outset
Rect outset(Rect rect, Scalar delta)

Returns rect outset by delta

scale
Rect scale(Rect rect, Scalar scale_x, Scalar scale_y)

Returns rect scaled by scale_x, scale_y

scale
Rect scale(Rect rect, Scalar scale_x, Scalar scale_y, Scalar focus_x, Scalar focus_y)

Returns rect scaled by scale_x, scale_y relative to focus_x,focus_y

Structs

IRect
struct IRect

Integer 2D rectangle.

Rect
struct Rect

2D rectangle

Meta

License

Boost Software License, Version 1.0

Authors

Chris Jones