dg2d.roundrect

This module provides a RoundRect type.

Members

Functions

combine
Rect combine(RoundRect a, RoundRect b)

returns the union of a and b, returns a plain rect as not sure what to do with the corners.

inset
RoundRect inset(RoundRect rect, Scalar delta)

Returns rect inset by delta, if you "adjustCorners" the corners will be adjusted to maintain equal distance from the source rect. (unless they get too small)

intersect
Rect intersect(RoundRect a, RoundRect b)

returns the intersection of a and b, returns a plain rect as not sure what to do with the corners.

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

Returns rect offset by x,y

offset
RoundRect offset(RoundRect rect, Point point)

Returns rect offset point

outset
RoundRect outset(RoundRect rect, Scalar delta)

Returns rect outset by delta, if you "adjustCorners" the corners will be adjusted to maintain equal distance from the source rect.

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

Returns rect scaled by scale_x,scale_y

Structs

RoundRect
struct RoundRect

Rounded rectangle.

Meta

License

Boost Software License, Version 1.0

Authors

Chris Jones

General features...

Custom radius on all four corners asPath can be used to get a PathIterator to trace the outline offset,scale,inset,outset,intersection and combine (IE union) operator overloads and free functions