HDK
|
#include <RE_WindowDrawable.h>
Public Member Functions | |
RE_WindowDrawablePaintState (RE_WindowDrawablePainter *painter, int paint_area_x, int paint_area_y, int paint_area_w, int paint_area_h) | |
~RE_WindowDrawablePaintState ()=default | |
RE_WindowDrawablePaintState (const RE_WindowDrawablePaintState &src) | |
RE_WindowDrawablePaintState & | operator= (const RE_WindowDrawablePaintState &src) |
RE_WindowDrawablePainter * | painter () const |
void | pushPaintArea (int paint_area_x, int paint_area_y, int paint_area_w, int paint_area_h) |
void | popPaintArea () |
Pop the current paint area from the stack. More... | |
const UT_DimRect & | paintArea () const |
Return the current paint area. More... | |
void | toPainterPosition (int &x, int &y, int w=0, int h=0) const |
void | toUIPosition (int &x, int &y, int w=0, int h=0) const |
Class to keep track of the painter and the current paint area in a paint session. The paint area y-origin and height are specified in Houdini's UI coordinate space (i.e. bottom-left origin).
Definition at line 97 of file RE_WindowDrawable.h.
RE_WindowDrawablePaintState::RE_WindowDrawablePaintState | ( | RE_WindowDrawablePainter * | painter, |
int | paint_area_x, | ||
int | paint_area_y, | ||
int | paint_area_w, | ||
int | paint_area_h | ||
) |
|
default |
RE_WindowDrawablePaintState::RE_WindowDrawablePaintState | ( | const RE_WindowDrawablePaintState & | src | ) |
RE_WindowDrawablePaintState& RE_WindowDrawablePaintState::operator= | ( | const RE_WindowDrawablePaintState & | src | ) |
const UT_DimRect& RE_WindowDrawablePaintState::paintArea | ( | ) | const |
Return the current paint area.
RE_WindowDrawablePainter* RE_WindowDrawablePaintState::painter | ( | ) | const |
void RE_WindowDrawablePaintState::popPaintArea | ( | ) |
Pop the current paint area from the stack.
void RE_WindowDrawablePaintState::pushPaintArea | ( | int | paint_area_x, |
int | paint_area_y, | ||
int | paint_area_w, | ||
int | paint_area_h | ||
) |
Push onto the stack a new paint area. This is needed by UI_Viewport, for example, which paints into an FBO with a different viewport.
void RE_WindowDrawablePaintState::toPainterPosition | ( | int & | x, |
int & | y, | ||
int | w = 0 , |
||
int | h = 0 |
||
) | const |
Convert the given x,y position from the Houdini UI coordinate space to Qt's QPainter coordinate space. If x,y is for the (bottom-left) corner of a rectangle, then specify the width and height of the rectangle to convert the x,y position to the Qt (top-left) rectangle.
Convert the given x,y position from the Qt QPainter coordinate space to the Houdini UI coordinate space. If x,y is for the (top-left) corner of a rectangle, then specify the width and height of the rectangle to convert the x,y position to the Houdini UI (bottom-left) rectangle.