Image Component Library (ICL)
|
Floating point precision implementation of the Rect class. More...
#include <Rect32f.h>
Public Member Functions | |
Rect32f () | |
default constructor More... | |
Rect32f (float x, float y, float width, float height) | |
creates a defined Rect32f More... | |
Rect32f (const Point32f &p, const Size32f &s) | |
creates a new Rect32f with specified offset and size More... | |
Rect32f (const Rect32f &r) | |
create a deep copy of a rect More... | |
Rect32f (const Rect &rect) | |
create a floating point rect from given int-valued rect More... | |
bool | isNull () const |
checks wether the object instance is null, i.e. all elements are zero More... | |
bool | operator== (const Rect32f &s) const |
checks if two rects are equal More... | |
bool | operator!= (const Rect32f &s) const |
checks if two rects are not equal More... | |
Rect32f | operator * (double d) const |
scales all parameters of the rect by a double value More... | |
Rect32f | operator/ (double d) const |
scales all parameters of the rect by a double value More... | |
Rect32f & | operator+= (const Size32f &s) |
adds a size to the rects size More... | |
Rect32f & | operator-= (const Size32f &s) |
substracs a size to the rects size More... | |
Rect32f & | operator+= (const Point32f &p) |
adds a Point to the rects offset More... | |
Rect32f & | operator-= (const Point32f &p) |
substracts a Point to the rects offset More... | |
Rect32f & | operator *= (double d) |
scales all rect params inplace More... | |
Rect32f & | operator/= (double d) |
scales all rect params inplace More... | |
float | getDim () const |
returns width*height More... | |
Rect32f | operator & (const Rect32f &r) const |
intersection of two Rect32fs More... | |
Rect32f & | operator&= (const Rect32f &r) |
inplace intersection of two rects More... | |
Rect32f | operator| (const Rect32f &r) const |
union of two Rect32fs More... | |
Rect32f & | operator|= (const Rect32f &r) |
inplace union of two rects More... | |
Rect32f | normalized () const |
rects with negative sizes are normalized to Positive sizes More... | |
bool | contains (const Rect32f &r) const |
returns if a Rect32f containes another rect More... | |
bool | contains (float x, float y) const |
returns if the Rect32f contains a given point More... | |
Rect32f & | enlarge (float k) |
let the rect grow by k pixles into each direction More... | |
Rect32f | enlarged (float k) const |
returns an enlarged instance of this rect More... | |
Point32f | ul () const |
returns upper left point of the rect More... | |
Point32f | ll () const |
returns lower left point of the rect More... | |
Point32f | ur () const |
returns upper right point of the rect More... | |
Point32f | lr () const |
returns lower right point of the rect More... | |
float | left () const |
returns the left border position More... | |
float | right () const |
returns the right border position More... | |
float | bottom () const |
returns the position of the bottom border More... | |
float | top () const |
returns the position of the upper border More... | |
Size32f | getSize () const |
returns the size of the rect More... | |
Point32f | center () const |
returns the center point of the rect More... | |
Rect32f | transform (double xfac, double yfac) const |
multiplies the rect's x and width by xfac and y and height by yfac More... | |
Public Attributes | |
float | x |
float | y |
!< x pos (upper left) More... | |
float | width |
!< y pos (upper left) More... | |
float | height |
!< width of the rect More... | |
Static Public Attributes | |
static const Rect32f | null |
!< height of the rect More... | |
Floating point precision implementation of the Rect class.
|
inline |
default constructor
|
inline |
creates a defined Rect32f
creates a new Rect32f with specified offset and size
|
inline |
create a deep copy of a rect
|
inline |
create a floating point rect from given int-valued rect
|
inline |
returns the position of the bottom border
|
inline |
returns the center point of the rect
|
inline |
returns if a Rect32f containes another rect
|
inline |
returns if the Rect32f contains a given point
|
inline |
let the rect grow by k pixles into each direction
if k<0 the rect becomes smaller E.g. Rect32f(10,10,90,90).enlarge(10) creates a Rect32f (0,0,100,100)
k | amount of pixel the rectangle is enlarged by |
|
inline |
returns an enlarged instance of this rect
|
inline |
returns width*height
|
inline |
returns the size of the rect
|
inline |
checks wether the object instance is null, i.e. all elements are zero
|
inline |
returns the left border position
|
inline |
returns lower left point of the rect
|
inline |
returns lower right point of the rect
|
inline |
rects with negative sizes are normalized to Positive sizes
e.g. the rect (5,5,-5,-5) is normalized to (0,0,5,5)
intersection of two Rect32fs
|
inline |
scales all parameters of the rect by a double value
|
inline |
scales all rect params inplace
|
inline |
checks if two rects are not equal
inplace intersection of two rects
adds a Point to the rects offset
substracs a size to the rects size
substracts a Point to the rects offset
|
inline |
scales all parameters of the rect by a double value
|
inline |
scales all rect params inplace
|
inline |
checks if two rects are equal
|
inline |
returns the right border position
|
inline |
returns the position of the upper border
|
inline |
multiplies the rect's x and width by xfac and y and height by yfac
|
inline |
returns upper left point of the rect
|
inline |
returns upper right point of the rect
float icl::utils::Rect32f::height |
!< width of the rect
|
static |
!< height of the rect
static null instance (0,0,0,0)
float icl::utils::Rect32f::width |
!< y pos (upper left)
float icl::utils::Rect32f::x |
float icl::utils::Rect32f::y |
!< x pos (upper left)