nux-0.9.46
|
#include <Nux/Painter.h>
Public Member Functions | |
BasePainter () | |
virtual | ~BasePainter () |
virtual void | Draw2DTexture (GraphicsEngine &GfxContext, BaseTexture *Texture, int x, int y) const |
Draw unscaled texture at position (x, y). The size of the quad is the size of the texture. | |
virtual void | Draw2DTextureAligned (GraphicsEngine &GfxContext, BaseTexture *Texture, const Geometry &g, TextureAlignmentStyle tex_align) const |
virtual int | PaintColorTextLineEdit (GraphicsEngine &GfxContext, const Geometry &g, const NString &Str, Color TextColor, bool WriteAlphaChannel, Color SelectedTextColor, Color SelectedTextBackgroundColor, Color TextBlinkColor, Color CursorColor, bool ShowCursor, unsigned int CursorPosition, int offset=0, int selection_start=0, int selection_end=0) const |
virtual int | PaintTextLineStatic (GraphicsEngine &GfxContext, ObjectPtr< FontTexture > Font, const Geometry &g, const NString &Str, const Color &color=Color(0.0f, 0.0f, 0.0f, 1.0f), bool WriteAlphaChannel=true, TextAlignment alignment=eAlignTextLeft) const |
void | Paint2DQuadColor (GraphicsEngine &GfxContext, const Geometry &g, Color c0) const |
void | Paint2DQuadColor (GraphicsEngine &GfxContext, const Geometry &g, Color c0_top_left, Color c1_bottom_left, Color c2_bottom_right, Color c3_top_right) const |
void | Paint2DQuadColor (GraphicsEngine &GfxContext, int x, int y, int width, int height, Color c0) const |
void | Paint2DQuadColor (GraphicsEngine &GfxContext, int x, int y, int width, int height, Color c0_top_left, Color c1_bottom_left, Color c2_bottom_right, Color c3_top_right) const |
void | Paint2DQuadVGradient (GraphicsEngine &GfxContext, const Geometry &g, Color TopColor, Color BottomColor) const |
Paint a 2D quad with a gradient color going from Top to Bottom. | |
void | Paint2DQuadHGradient (GraphicsEngine &GfxContext, const Geometry &g, Color LeftColor, Color RightColor) const |
Paint a 2D quad with a gradient color going from Left to Right. | |
void | Paint2DQuadWireframe (GraphicsEngine &GfxContext, const Geometry &g, Color c0) const |
void | Paint2DQuadWireframe (GraphicsEngine &GfxContext, const Geometry &g, Color c_top_left, Color c_bottom_left, Color c_bottom_right, Color c_top_right) const |
void | Paint2DQuadWireframe (GraphicsEngine &GfxContext, int x, int y, int width, int height, Color c0) const |
void | Paint2DQuadWireframe (GraphicsEngine &GfxContext, int x, int y, int width, int height, Color c_top_left, Color c_bottom_left, Color c_bottom_right, Color c_top_right) const |
void | Draw2DTriangleColor (GraphicsEngine &GfxContext, int x0, int y0, int x1, int y1, int x2, int y2, Color c0) |
void | Draw2DTriangleColor (GraphicsEngine &GfxContext, int x0, int y0, int x1, int y1, int x2, int y2, Color c0, Color c1, Color c2) |
void | Draw2DLine (GraphicsEngine &GfxContext, int x0, int y0, int x1, int y1, Color c0) const |
void | Draw2DLine (GraphicsEngine &GfxContext, int x0, int y0, int x1, int y1, Color c0, Color c1) const |
void | PaintShape (GraphicsEngine &GfxContext, const Geometry &geo, Color c0, UXStyleImageRef style, bool WriteAlpha=true) const |
void | PaintShapeCorner (GraphicsEngine &GfxContext, const Geometry &geo, Color c0, UXStyleImageRef style, long corners, bool WriteAlpha=true) const |
void | PaintShapeROP (GraphicsEngine &GfxContext, const Geometry &geo, Color c0, UXStyleImageRef style, bool WriteAlpha=true, const ROPConfig &ROP=ROPConfig::Default) const |
void | PaintShapeCornerROP (GraphicsEngine &GfxContext, const Geometry &geo, Color c0, UXStyleImageRef style, long corners, bool WriteAlpha=true, const ROPConfig &ROP=ROPConfig::Default) const |
void | PaintTextureShape (GraphicsEngine &GfxContext, const Geometry &geo, UXStyleImageRef style) const |
void | PaintTextureShape (GraphicsEngine &GfxContext, const Geometry &geo, BaseTexture *Texture, int border_left, int border_right, int border_top, int border_bottom, bool draw_borders_only) const |
void | PaintCheckBox (GraphicsEngine &GfxContext, const Geometry &geo, const InteractState &interaction_state, Color check_mark_color=Color(0x0), Color check_box_color=Color(0x0)) |
Draw Check Box. | |
void | PaintRadioButton (GraphicsEngine &GfxContext, const Geometry &geo, const InteractState &interaction_state, Color check_mark_color=Color(0x0), Color check_box_color=Color(0x0)) |
void | PaintHorizontalGradientQuad (GraphicsEngine &GfxContext, const Geometry &geo, int num_color, float *percentage_array, Color *color_array) |
void | PushColorLayer (GraphicsEngine &GfxContext, const Geometry &geo, Color color, bool WriteAlpha=false, const ROPConfig &ROP=ROPConfig::Default) |
void | PushShapeLayer (GraphicsEngine &GfxContext, Geometry geo, UXStyleImageRef imageStyle, const Color &color, unsigned long Corners=eAllCorners, bool WriteAlpha=false, const ROPConfig &ROP=ROPConfig::Default) |
void | PushSliceScaledTextureLayer (GraphicsEngine &GfxContext, Geometry geo, UXStyleImageRef imageStyle, const Color &color, unsigned long Corners=eAllCorners, bool WriteAlpha=false, const ROPConfig &ROP=ROPConfig::Default) |
void | PushTextureLayer (GraphicsEngine &GfxContext, Geometry geo, ObjectPtr< IOpenGLBaseTexture > DeviceTexture, TexCoordXForm texxform, const Color &color, bool WriteAlpha=false, const ROPConfig &ROP=ROPConfig::Default) |
void | PushDrawColorLayer (GraphicsEngine &GfxContext, const Geometry &geo, Color color, bool WriteAlpha=false, const ROPConfig &ROP=ROPConfig::Default) |
void | PushDrawShapeLayer (GraphicsEngine &GfxContext, Geometry geo, UXStyleImageRef imageStyle, const Color &color, unsigned long Corners=eAllCorners, bool WriteAlpha=false, const ROPConfig &ROP=ROPConfig::Default) |
void | PushDrawSliceScaledTextureLayer (GraphicsEngine &GfxContext, Geometry geo, UXStyleImageRef imageStyle, const Color &color, unsigned long Corners=eAllCorners, bool WriteAlpha=false, const ROPConfig &ROP=ROPConfig::Default) |
void | PushDrawTextureLayer (GraphicsEngine &GfxContext, Geometry geo, ObjectPtr< IOpenGLBaseTexture > DeviceTexture, TexCoordXForm texxform, const Color &color, bool WriteAlpha=false, const ROPConfig &ROP=ROPConfig::Default) |
void | PushLayer (GraphicsEngine &GfxContext, const Geometry &geo, AbstractPaintLayer *layer) |
void | PushDrawLayer (GraphicsEngine &GfxContext, const Geometry &geo, AbstractPaintLayer *layer) |
void | RenderSinglePaintLayer (GraphicsEngine &GfxContext, Geometry geo, AbstractPaintLayer *paint_layer) |
Render a paint layer. | |
void | PopBackground (int level=1) |
void | EmptyBackgroundStack () |
void | PaintBackground (GraphicsEngine &GfxContext, const Geometry &geo) |
Data Fields | |
int | intTest |
std::list< AbstractPaintLayer * > | m_BackgroundStack |
nux::BasePainter::BasePainter | ( | ) |
virtual nux::BasePainter::~BasePainter | ( | ) | [virtual] |
void nux::BasePainter::Draw2DLine | ( | GraphicsEngine & | GfxContext, |
int | x0, | ||
int | y0, | ||
int | x1, | ||
int | y1, | ||
Color | c0 | ||
) | const |
void nux::BasePainter::Draw2DLine | ( | GraphicsEngine & | GfxContext, |
int | x0, | ||
int | y0, | ||
int | x1, | ||
int | y1, | ||
Color | c0, | ||
Color | c1 | ||
) | const |
virtual void nux::BasePainter::Draw2DTexture | ( | GraphicsEngine & | GfxContext, |
BaseTexture * | Texture, | ||
int | x, | ||
int | y | ||
) | const [virtual] |
Draw unscaled texture at position (x, y). The size of the quad is the size of the texture.
virtual void nux::BasePainter::Draw2DTextureAligned | ( | GraphicsEngine & | GfxContext, |
BaseTexture * | Texture, | ||
const Geometry & | g, | ||
TextureAlignmentStyle | tex_align | ||
) | const [virtual] |
void nux::BasePainter::Draw2DTriangleColor | ( | GraphicsEngine & | GfxContext, |
int | x0, | ||
int | y0, | ||
int | x1, | ||
int | y1, | ||
int | x2, | ||
int | y2, | ||
Color | c0, | ||
Color | c1, | ||
Color | c2 | ||
) |
void nux::BasePainter::Draw2DTriangleColor | ( | GraphicsEngine & | GfxContext, |
int | x0, | ||
int | y0, | ||
int | x1, | ||
int | y1, | ||
int | x2, | ||
int | y2, | ||
Color | c0 | ||
) |
void nux::BasePainter::EmptyBackgroundStack | ( | ) |
void nux::BasePainter::Paint2DQuadColor | ( | GraphicsEngine & | GfxContext, |
int | x, | ||
int | y, | ||
int | width, | ||
int | height, | ||
Color | c0_top_left, | ||
Color | c1_bottom_left, | ||
Color | c2_bottom_right, | ||
Color | c3_top_right | ||
) | const |
void nux::BasePainter::Paint2DQuadColor | ( | GraphicsEngine & | GfxContext, |
const Geometry & | g, | ||
Color | c0 | ||
) | const |
void nux::BasePainter::Paint2DQuadColor | ( | GraphicsEngine & | GfxContext, |
const Geometry & | g, | ||
Color | c0_top_left, | ||
Color | c1_bottom_left, | ||
Color | c2_bottom_right, | ||
Color | c3_top_right | ||
) | const |
void nux::BasePainter::Paint2DQuadColor | ( | GraphicsEngine & | GfxContext, |
int | x, | ||
int | y, | ||
int | width, | ||
int | height, | ||
Color | c0 | ||
) | const |
void nux::BasePainter::Paint2DQuadHGradient | ( | GraphicsEngine & | GfxContext, |
const Geometry & | g, | ||
Color | LeftColor, | ||
Color | RightColor | ||
) | const |
Paint a 2D quad with a gradient color going from Left to Right.
Paint a 2D quad with a gradient color going from Left to Right.
g | Geometry of the quad. |
LeftColor | color at the top of the quad. |
RightColor | color at the bottom of the quad. |
void nux::BasePainter::Paint2DQuadVGradient | ( | GraphicsEngine & | GfxContext, |
const Geometry & | g, | ||
Color | TopColor, | ||
Color | BottomColor | ||
) | const |
Paint a 2D quad with a gradient color going from Top to Bottom.
Paint a 2D quad with a gradient color going from Top to Bottom.
g | Geometry of the quad. |
TopColor | color at the top of the quad. |
TopColor | color at the bottom of the quad. |
void nux::BasePainter::Paint2DQuadWireframe | ( | GraphicsEngine & | GfxContext, |
const Geometry & | g, | ||
Color | c0 | ||
) | const |
void nux::BasePainter::Paint2DQuadWireframe | ( | GraphicsEngine & | GfxContext, |
const Geometry & | g, | ||
Color | c_top_left, | ||
Color | c_bottom_left, | ||
Color | c_bottom_right, | ||
Color | c_top_right | ||
) | const |
void nux::BasePainter::Paint2DQuadWireframe | ( | GraphicsEngine & | GfxContext, |
int | x, | ||
int | y, | ||
int | width, | ||
int | height, | ||
Color | c0 | ||
) | const |
void nux::BasePainter::Paint2DQuadWireframe | ( | GraphicsEngine & | GfxContext, |
int | x, | ||
int | y, | ||
int | width, | ||
int | height, | ||
Color | c_top_left, | ||
Color | c_bottom_left, | ||
Color | c_bottom_right, | ||
Color | c_top_right | ||
) | const |
void nux::BasePainter::PaintBackground | ( | GraphicsEngine & | GfxContext, |
const Geometry & | geo | ||
) |
void nux::BasePainter::PaintCheckBox | ( | GraphicsEngine & | GfxContext, |
const Geometry & | geo, | ||
const InteractState & | interaction_state, | ||
Color | check_mark_color = Color(0x0) , |
||
Color | check_box_color = Color(0x0) |
||
) |
Draw Check Box.
Draw a Check box.
virtual int nux::BasePainter::PaintColorTextLineEdit | ( | GraphicsEngine & | GfxContext, |
const Geometry & | g, | ||
const NString & | Str, | ||
Color | TextColor, | ||
bool | WriteAlphaChannel, | ||
Color | SelectedTextColor, | ||
Color | SelectedTextBackgroundColor, | ||
Color | TextBlinkColor, | ||
Color | CursorColor, | ||
bool | ShowCursor, | ||
unsigned int | CursorPosition, | ||
int | offset = 0 , |
||
int | selection_start = 0 , |
||
int | selection_end = 0 |
||
) | const [virtual] |
void nux::BasePainter::PaintHorizontalGradientQuad | ( | GraphicsEngine & | GfxContext, |
const Geometry & | geo, | ||
int | num_color, | ||
float * | percentage_array, | ||
Color * | color_array | ||
) |
void nux::BasePainter::PaintRadioButton | ( | GraphicsEngine & | GfxContext, |
const Geometry & | geo, | ||
const InteractState & | interaction_state, | ||
Color | check_mark_color = Color(0x0) , |
||
Color | check_box_color = Color(0x0) |
||
) |
void nux::BasePainter::PaintShape | ( | GraphicsEngine & | GfxContext, |
const Geometry & | geo, | ||
Color | c0, | ||
UXStyleImageRef | style, | ||
bool | WriteAlpha = true |
||
) | const |
void nux::BasePainter::PaintShapeCorner | ( | GraphicsEngine & | GfxContext, |
const Geometry & | geo, | ||
Color | c0, | ||
UXStyleImageRef | style, | ||
long | corners, | ||
bool | WriteAlpha = true |
||
) | const |
void nux::BasePainter::PaintShapeCornerROP | ( | GraphicsEngine & | GfxContext, |
const Geometry & | geo, | ||
Color | c0, | ||
UXStyleImageRef | style, | ||
long | corners, | ||
bool | WriteAlpha = true , |
||
const ROPConfig & | ROP = ROPConfig::Default |
||
) | const |
void nux::BasePainter::PaintShapeROP | ( | GraphicsEngine & | GfxContext, |
const Geometry & | geo, | ||
Color | c0, | ||
UXStyleImageRef | style, | ||
bool | WriteAlpha = true , |
||
const ROPConfig & | ROP = ROPConfig::Default |
||
) | const |
virtual int nux::BasePainter::PaintTextLineStatic | ( | GraphicsEngine & | GfxContext, |
ObjectPtr< FontTexture > | Font, | ||
const Geometry & | g, | ||
const NString & | Str, | ||
const Color & | color = Color(0.0f, 0.0f, 0.0f, 1.0f) , |
||
bool | WriteAlphaChannel = true , |
||
TextAlignment | alignment = eAlignTextLeft |
||
) | const [virtual] |
void nux::BasePainter::PaintTextureShape | ( | GraphicsEngine & | GfxContext, |
const Geometry & | geo, | ||
UXStyleImageRef | style | ||
) | const |
void nux::BasePainter::PaintTextureShape | ( | GraphicsEngine & | GfxContext, |
const Geometry & | geo, | ||
BaseTexture * | Texture, | ||
int | border_left, | ||
int | border_right, | ||
int | border_top, | ||
int | border_bottom, | ||
bool | draw_borders_only | ||
) | const |
void nux::BasePainter::PopBackground | ( | int | level = 1 | ) |
Pop a number of levels off the painter background stack.
Referenced by nux::PushColorBackgroundScope::~PushColorBackgroundScope(), nux::PushShapeBackgroundScope::~PushShapeBackgroundScope(), and nux::PushShapeCornerBackgroundScope::~PushShapeCornerBackgroundScope().
void nux::BasePainter::PushColorLayer | ( | GraphicsEngine & | GfxContext, |
const Geometry & | geo, | ||
Color | color, | ||
bool | WriteAlpha = false , |
||
const ROPConfig & | ROP = ROPConfig::Default |
||
) |
Referenced by nux::PushColorBackgroundScope::PushColorBackgroundScope().
void nux::BasePainter::PushDrawColorLayer | ( | GraphicsEngine & | GfxContext, |
const Geometry & | geo, | ||
Color | color, | ||
bool | WriteAlpha = false , |
||
const ROPConfig & | ROP = ROPConfig::Default |
||
) |
Referenced by nux::PushColorBackgroundScope::PushColorBackgroundScope().
void nux::BasePainter::PushDrawLayer | ( | GraphicsEngine & | GfxContext, |
const Geometry & | geo, | ||
AbstractPaintLayer * | layer | ||
) |
void nux::BasePainter::PushDrawShapeLayer | ( | GraphicsEngine & | GfxContext, |
Geometry | geo, | ||
UXStyleImageRef | imageStyle, | ||
const Color & | color, | ||
unsigned long | Corners = eAllCorners , |
||
bool | WriteAlpha = false , |
||
const ROPConfig & | ROP = ROPConfig::Default |
||
) |
void nux::BasePainter::PushDrawSliceScaledTextureLayer | ( | GraphicsEngine & | GfxContext, |
Geometry | geo, | ||
UXStyleImageRef | imageStyle, | ||
const Color & | color, | ||
unsigned long | Corners = eAllCorners , |
||
bool | WriteAlpha = false , |
||
const ROPConfig & | ROP = ROPConfig::Default |
||
) |
void nux::BasePainter::PushDrawTextureLayer | ( | GraphicsEngine & | GfxContext, |
Geometry | geo, | ||
ObjectPtr< IOpenGLBaseTexture > | DeviceTexture, | ||
TexCoordXForm | texxform, | ||
const Color & | color, | ||
bool | WriteAlpha = false , |
||
const ROPConfig & | ROP = ROPConfig::Default |
||
) |
void nux::BasePainter::PushLayer | ( | GraphicsEngine & | GfxContext, |
const Geometry & | geo, | ||
AbstractPaintLayer * | layer | ||
) |
void nux::BasePainter::PushShapeLayer | ( | GraphicsEngine & | GfxContext, |
Geometry | geo, | ||
UXStyleImageRef | imageStyle, | ||
const Color & | color, | ||
unsigned long | Corners = eAllCorners , |
||
bool | WriteAlpha = false , |
||
const ROPConfig & | ROP = ROPConfig::Default |
||
) |
void nux::BasePainter::PushSliceScaledTextureLayer | ( | GraphicsEngine & | GfxContext, |
Geometry | geo, | ||
UXStyleImageRef | imageStyle, | ||
const Color & | color, | ||
unsigned long | Corners = eAllCorners , |
||
bool | WriteAlpha = false , |
||
const ROPConfig & | ROP = ROPConfig::Default |
||
) |
void nux::BasePainter::PushTextureLayer | ( | GraphicsEngine & | GfxContext, |
Geometry | geo, | ||
ObjectPtr< IOpenGLBaseTexture > | DeviceTexture, | ||
TexCoordXForm | texxform, | ||
const Color & | color, | ||
bool | WriteAlpha = false , |
||
const ROPConfig & | ROP = ROPConfig::Default |
||
) |
void nux::BasePainter::RenderSinglePaintLayer | ( | GraphicsEngine & | GfxContext, |
Geometry | geo, | ||
AbstractPaintLayer * | paint_layer | ||
) |
Render a paint layer.
When calling this function make sure to assign a correct geometry to the paint layer parameter.
std::list<AbstractPaintLayer *> nux::BasePainter::m_BackgroundStack |