FastUIDraw
|
#include <rounded_rect.hpp>
Public Member Functions | |
RoundedRect (void) | |
RoundedRect & | corner_radii (vec2 v) |
RoundedRect & | corner_radius (enum corner_t c, vec2 v) |
bool | is_flat (void) const |
RoundedRect & | make_flat (void) |
RoundedRect & | sanitize (void) |
Public Member Functions inherited from fastuidraw::RectT< float > | |
RectT (void) | |
RectT (const RectT< S > &rect) | |
RectT & | height (float h) |
float | height (void) const |
RectT & | max_point (const vecN< float, 2 > &p) |
RectT & | max_point (float x, float y) |
float & | max_x (void) |
float | max_x (void) const |
float & | max_y (void) |
float | max_y (void) const |
RectT & | min_point (const vecN< float, 2 > &p) |
RectT & | min_point (float x, float y) |
float & | min_x (void) |
float | min_x (void) const |
float & | min_y (void) |
float | min_y (void) const |
vecN< float, 2 > | point (enum corner_t c) const |
RectT & | sanitize_size (void) |
RectT & | size (const vecN< float, 2 > &sz) |
RectT & | size (float width, float height) |
vecN< float, 2 > | size (void) const |
RectT & | translate (const vecN< float, 2 > &tr) |
RectT & | translate (float x, float y) |
RectT & | width (float w) |
float | width (void) const |
Public Attributes | |
vecN< vec2, 4 > | m_corner_radii |
Public Attributes inherited from fastuidraw::RectT< float > | |
vecN< float, 2 > | m_max_point |
vecN< float, 2 > | m_min_point |
Additional Inherited Members | |
Public Types inherited from fastuidraw::RectEnums | |
enum | { maxx_mask = 1, maxy_mask = 2 } |
enum | corner_t { minx_miny_corner = 0, minx_maxy_corner = maxy_mask, maxx_miny_corner = maxx_mask, maxx_maxy_corner = maxx_mask | maxy_mask } |
Class to specify the geometry of a rounded rectangle; the geometry of the base class Rect defines the -bounding- rectangle of the RoundedRect
Definition at line 35 of file rounded_rect.hpp.
|
inline |
Defautl ctor, intializing all fields as zero,
Definition at line 41 of file rounded_rect.hpp.
|
inline |
Provided as a conveniance, sets each element of m_corner_radii to the named value.
v | value to which to set the corner radii |
Definition at line 66 of file rounded_rect.hpp.
|
inline |
Provided as a conveniance, equivalent to
c | which radii corner to set |
v | value to which to set the corner radii |
Definition at line 54 of file rounded_rect.hpp.
|
inline |
Returns true if each corner radii is 0.
Definition at line 86 of file rounded_rect.hpp.
|
inline |
Set all corner radii values to 0.
Definition at line 77 of file rounded_rect.hpp.
|
inline |
Sanitize the RoundedRect as follows:
Definition at line 101 of file rounded_rect.hpp.
Specifies the radii at each of the corners, enumerated by corner_t
Definition at line 126 of file rounded_rect.hpp.