Back to index

nux  3.0.0
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
nux::BasePainter Class Reference

#include <Painter.h>

Collaboration diagram for nux::BasePainter:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 BasePainter (WindowThread *window_thread)
virtual ~BasePainter ()
virtual void Draw2DTexture (GraphicsEngine &graphics_engine, 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 &graphics_engine, BaseTexture *Texture, const Geometry &g, TextureAlignmentStyle tex_align) const
virtual int PaintColorTextLineEdit (GraphicsEngine &graphics_engine, 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 &graphics_engine, 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 &graphics_engine, const Geometry &g, const Color &c0) const
void Paint2DQuadColor (GraphicsEngine &graphics_engine, const Geometry &g, const Color &c0_top_left, const Color &c1_bottom_left, const Color &c2_bottom_right, const Color &c3_top_right) const
void Paint2DQuadColor (GraphicsEngine &graphics_engine, int x, int y, int width, int height, const Color &c0) const
void Paint2DQuadColor (GraphicsEngine &graphics_engine, int x, int y, int width, int height, const Color &c0_top_left, const Color &c1_bottom_left, const Color &c2_bottom_right, const Color &c3_top_right) const
void Paint2DQuadVGradient (GraphicsEngine &graphics_engine, const Geometry &g, Color TopColor, Color BottomColor) const
 Paint a 2D quad with a gradient color going from Top to Bottom.
void Paint2DQuadHGradient (GraphicsEngine &graphics_engine, const Geometry &g, Color LeftColor, Color RightColor) const
 Paint a 2D quad with a gradient color going from Left to Right.
void Paint2DQuadWireframe (GraphicsEngine &graphics_engine, const Geometry &g, Color c0) const
void Paint2DQuadWireframe (GraphicsEngine &graphics_engine, const Geometry &g, Color c_top_left, Color c_bottom_left, Color c_bottom_right, Color c_top_right) const
void Paint2DQuadWireframe (GraphicsEngine &graphics_engine, int x, int y, int width, int height, Color c0) const
void Paint2DQuadWireframe (GraphicsEngine &graphics_engine, 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 &graphics_engine, int x0, int y0, int x1, int y1, int x2, int y2, Color c0)
void Draw2DTriangleColor (GraphicsEngine &graphics_engine, int x0, int y0, int x1, int y1, int x2, int y2, Color c0, Color c1, Color c2)
void Draw2DLine (GraphicsEngine &graphics_engine, int x0, int y0, int x1, int y1, Color c0) const
void Draw2DLine (GraphicsEngine &graphics_engine, int x0, int y0, int x1, int y1, Color c0, Color c1) const
void PaintShape (GraphicsEngine &graphics_engine, const Geometry &geo, const Color &c0, UXStyleImageRef style, bool WriteAlpha=true) const
void PaintShapeCorner (GraphicsEngine &graphics_engine, const Geometry &geo, const Color &c0, UXStyleImageRef style, long corners, bool WriteAlpha=true) const
void PaintShapeROP (GraphicsEngine &graphics_engine, const Geometry &geo, const Color &c0, UXStyleImageRef style, bool WriteAlpha=true, const ROPConfig &ROP=ROPConfig::Default) const
void PaintShapeCornerROP (GraphicsEngine &graphics_engine, const Geometry &geo, const Color &c0, UXStyleImageRef style, long corners, bool WriteAlpha=true, const ROPConfig &ROP=ROPConfig::Default) const
void PaintTextureShape (GraphicsEngine &graphics_engine, const Geometry &geo, UXStyleImageRef style) const
void PaintTextureShape (GraphicsEngine &graphics_engine, const Geometry &geo, BaseTexture *Texture, int border_left, int border_right, int border_top, int border_bottom, bool draw_borders_only, bool premultiply=true) const
void PaintCheckBox (GraphicsEngine &graphics_engine, 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 &graphics_engine, const Geometry &geo, const InteractState &interaction_state, Color check_mark_color=Color(0x0), Color check_box_color=Color(0x0))
void PaintHorizontalGradientQuad (GraphicsEngine &graphics_engine, const Geometry &geo, int num_color, float *percentage_array, Color *color_array)
void PushColorLayer (GraphicsEngine &graphics_engine, const Geometry &geo, Color color, bool WriteAlpha=false, const ROPConfig &ROP=ROPConfig::Default)
void PushShapeLayer (GraphicsEngine &graphics_engine, Geometry geo, UXStyleImageRef imageStyle, const Color &color, unsigned long Corners=eAllCorners, bool WriteAlpha=false, const ROPConfig &ROP=ROPConfig::Default)
void PushSliceScaledTextureLayer (GraphicsEngine &graphics_engine, Geometry geo, UXStyleImageRef imageStyle, const Color &color, unsigned long Corners=eAllCorners, bool WriteAlpha=false, const ROPConfig &ROP=ROPConfig::Default)
void PushTextureLayer (GraphicsEngine &graphics_engine, Geometry geo, ObjectPtr< IOpenGLBaseTexture > DeviceTexture, TexCoordXForm texxform, const Color &color, bool WriteAlpha=false, const ROPConfig &ROP=ROPConfig::Default)
void PushColorizeTextureLayer (GraphicsEngine &graphics_engine, Geometry geo, ObjectPtr< IOpenGLBaseTexture > DeviceTexture, TexCoordXForm texxform, const Color &color, bool WriteAlpha, const ROPConfig &ROP, const Color &blend_color, LayerBlendMode layer_blend_mode)
void PushDrawColorLayer (GraphicsEngine &graphics_engine, const Geometry &geo, Color color, bool WriteAlpha=false, const ROPConfig &ROP=ROPConfig::Default)
void PushDrawShapeLayer (GraphicsEngine &graphics_engine, Geometry geo, UXStyleImageRef imageStyle, const Color &color, unsigned long Corners=eAllCorners, bool WriteAlpha=false, const ROPConfig &ROP=ROPConfig::Default)
void PushDrawSliceScaledTextureLayer (GraphicsEngine &graphics_engine, Geometry geo, UXStyleImageRef imageStyle, const Color &color, unsigned long Corners=eAllCorners, bool WriteAlpha=false, const ROPConfig &ROP=ROPConfig::Default)
void PushDrawTextureLayer (GraphicsEngine &graphics_engine, Geometry geo, ObjectPtr< IOpenGLBaseTexture > DeviceTexture, TexCoordXForm texxform, const Color &color, bool WriteAlpha=false, const ROPConfig &ROP=ROPConfig::Default)
void PushDrawColorizeTextureLayer (GraphicsEngine &graphics_engine, Geometry geo, ObjectPtr< IOpenGLBaseTexture > DeviceTexture, TexCoordXForm texxform, const Color &color, bool WriteAlpha, const ROPConfig &ROP, const Color &blend_color, LayerBlendMode layer_blend_mode)
void PushCompositionLayer (GraphicsEngine &graphics_engine, Geometry geo, ObjectPtr< IOpenGLBaseTexture > texture0, TexCoordXForm texxform0, const Color &color0, ObjectPtr< IOpenGLBaseTexture > texture1, TexCoordXForm texxform1, const Color &color1, LayerBlendMode layer_blend_mode, bool WriteAlpha, const ROPConfig &ROP)
void PushDrawCompositionLayer (GraphicsEngine &graphics_engine, Geometry geo, ObjectPtr< IOpenGLBaseTexture > texture0, TexCoordXForm texxform0, const Color &color0, ObjectPtr< IOpenGLBaseTexture > texture1, TexCoordXForm texxform1, const Color &color1, LayerBlendMode layer_blend_mode, bool WriteAlpha, const ROPConfig &ROP)
void PushCompositionLayer (GraphicsEngine &graphics_engine, Geometry geo, ObjectPtr< IOpenGLBaseTexture > texture0, TexCoordXForm texxform0, const Color &color0, const Color &blend_color, LayerBlendMode layer_blend_mode, bool WriteAlpha, const ROPConfig &ROP)
void PushDrawCompositionLayer (GraphicsEngine &graphics_engine, Geometry geo, ObjectPtr< IOpenGLBaseTexture > texture0, TexCoordXForm texxform0, const Color &color0, const Color &blend_color, LayerBlendMode layer_blend_mode, bool WriteAlpha, const ROPConfig &ROP)
void PushCompositionLayer (GraphicsEngine &graphics_engine, Geometry geo, const Color &base_color, ObjectPtr< IOpenGLBaseTexture > texture0, TexCoordXForm texxform0, const Color &color0, LayerBlendMode layer_blend_mode, bool WriteAlpha, const ROPConfig &ROP)
void PushDrawCompositionLayer (GraphicsEngine &graphics_engine, Geometry geo, const Color &base_color, ObjectPtr< IOpenGLBaseTexture > texture0, TexCoordXForm texxform0, const Color &color0, LayerBlendMode layer_blend_mode, bool WriteAlpha, const ROPConfig &ROP)
void PushLayer (GraphicsEngine &graphics_engine, const Geometry &geo, AbstractPaintLayer *layer)
void PushDrawLayer (GraphicsEngine &graphics_engine, const Geometry &geo, AbstractPaintLayer *layer)
void RenderSinglePaintLayer (GraphicsEngine &graphics_engine, Geometry geo, AbstractPaintLayer *paint_layer)
 Render a paint layer.
void PopBackground (int level=1)
 Deprecated. Use PopPaintLayer.
void PopPaintLayer (int level=1)
 Pop the top most paint layers from the active paint layer stack.
void EmptyBackgroundStack ()
 Deprecated. Use EmptyActivePaintLayerStack.
void EmptyActivePaintLayerStack ()
 Empty the active paint layer stack.
void PaintBackground (GraphicsEngine &graphics_engine, const Geometry &geo)
 Deprecated. Use PaintActivePaintLayerStack.
void PaintActivePaintLayerStack (GraphicsEngine &graphics_engine, const Geometry &geo)
void PushBackgroundStack ()
 Deprecated. Use PushPaintLayerStack.
void PushPaintLayerStack ()
void PopBackgroundStack ()
 Deprecated. Use PopPaintLayerStack.
void PopPaintLayerStack ()

Public Attributes

int intTest

Private Member Functions

void EmptyPushedPaintLayerStack ()
 Clear all the pushed paint layers.

Private Attributes

std::list< AbstractPaintLayer * > active_paint_layer_stack_
std::list< std::list
< AbstractPaintLayer * > > 
pushed_paint_layer_stack_
WindowThreadwindow_thread_
 The WindowThread to which this object belongs.

Detailed Description

Definition at line 138 of file Painter.h.


Constructor & Destructor Documentation

Definition at line 169 of file Painter.cpp.

  : window_thread_(window_thread)
  {
  }

Definition at line 174 of file Painter.cpp.

Here is the call graph for this function:


Member Function Documentation

void nux::BasePainter::Draw2DLine ( GraphicsEngine graphics_engine,
int  x0,
int  y0,
int  x1,
int  y1,
Color  c0 
) const

Definition at line 374 of file Painter.cpp.

  {
    graphics_engine.QRP_Line(x0, y0, x1, y1, c0);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::BasePainter::Draw2DLine ( GraphicsEngine graphics_engine,
int  x0,
int  y0,
int  x1,
int  y1,
Color  c0,
Color  c1 
) const

Definition at line 379 of file Painter.cpp.

  {
    graphics_engine.QRP_Line(x0, y0, x1, y1, c0, c1);
  }

Here is the call graph for this function:

void nux::BasePainter::Draw2DTexture ( GraphicsEngine graphics_engine,
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.

Definition at line 225 of file Painter.cpp.

  {
    float tex_w, tex_h;
    tex_w = (float) texture->GetWidth();
    tex_h = (float) texture->GetHeight();

    TexCoordXForm texxform;
    graphics_engine.QRP_1Tex(x, y, tex_w, tex_h, texture->GetDeviceTexture(), texxform, color::White);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::BasePainter::Draw2DTextureAligned ( GraphicsEngine graphics_engine,
BaseTexture Texture,
const Geometry g,
TextureAlignmentStyle  tex_align 
) const [virtual]

Definition at line 235 of file Painter.cpp.

  {
    int x_pos, y_pos;
    int tex_w, tex_h;
    tex_w = (float) texture->GetWidth();
    tex_h = (float) texture->GetHeight();

    if (tex_align.horz_alignment == eTACenter)
    {
      int offset = (g.GetWidth() - tex_w) / 2.0f;
      offset = (offset < 0) ? 0 : offset;
      x_pos = g.x + offset;
    }
    else if (tex_align.horz_alignment == eTALeft)
    {
      x_pos = g.x + tex_align.horizontal_margin;
    }
    else if (tex_align.horz_alignment == eTARight)
    {
      x_pos = g.x + g.GetWidth() - tex_w - tex_align.horizontal_margin;
    }
    else
    {
      x_pos = g.x + tex_align.horizontal_margin;
    }

    if (tex_align.vert_alignment == eTACenter)
    {
      int offset = (g.GetHeight() - tex_h) / 2.0f;
      offset = (offset < 0) ? 0 : offset;
      y_pos = g.y + offset;
    }
    else if (tex_align.vert_alignment == eTATop)
    {
      y_pos = g.y + tex_align.vertical_margin;
    }
    else if (tex_align.vert_alignment == eTABottom)
    {
      y_pos = g.y + g.GetHeight() - tex_h - tex_align.vertical_margin;
    }
    else
    {
      y_pos = g.y + tex_align.vertical_margin;
    }

    PaintTextureShape(graphics_engine, Geometry(x_pos, y_pos, tex_w, tex_h), texture, 0, 0, 0, 0, 0);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::BasePainter::Draw2DTriangleColor ( GraphicsEngine graphics_engine,
int  x0,
int  y0,
int  x1,
int  y1,
int  x2,
int  y2,
Color  c0 
)

Definition at line 355 of file Painter.cpp.

  {
    graphics_engine.QRP_Triangle(x0, y0, x1, y1, x2, y2, c0);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::BasePainter::Draw2DTriangleColor ( GraphicsEngine graphics_engine,
int  x0,
int  y0,
int  x1,
int  y1,
int  x2,
int  y2,
Color  c0,
Color  c1,
Color  c2 
)

Definition at line 363 of file Painter.cpp.

  {
    graphics_engine.QRP_Triangle(x0, y0, x1, y1, x2, y2, c0, c1, c2);
  }

Here is the call graph for this function:

Empty the active paint layer stack.

Empty the active paint layer stack. All paint layers in the active stack are deleted.

Definition at line 1103 of file Painter.cpp.

  {
    std::list<AbstractPaintLayer*>::iterator background_layer_it;
    for (background_layer_it = active_paint_layer_stack_.begin(); background_layer_it != active_paint_layer_stack_.end(); ++background_layer_it)
    {
      delete(*background_layer_it);
    }
    active_paint_layer_stack_.clear();
  }

Here is the caller graph for this function:

Deprecated. Use EmptyActivePaintLayerStack.

Definition at line 1098 of file Painter.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Clear all the pushed paint layers.

Clear all the pushed paint layers. Each layer in a paint layer stack is deleted.

Definition at line 1113 of file Painter.cpp.

  {
    std::list<std::list<AbstractPaintLayer*> >::iterator pushed_paint_layer_it;
    for (pushed_paint_layer_it = pushed_paint_layer_stack_.begin(); pushed_paint_layer_it != pushed_paint_layer_stack_.end(); ++pushed_paint_layer_it)
    {
      std::list<AbstractPaintLayer*> paint_layer_stack = *pushed_paint_layer_it;
      {
        std::list<AbstractPaintLayer*>::iterator paint_layer_it;
        for (paint_layer_it = paint_layer_stack.begin(); paint_layer_it != paint_layer_stack.end(); ++paint_layer_it)
        {
          delete(*paint_layer_it);
        }
        paint_layer_stack.clear();
      }
    }
    active_paint_layer_stack_.clear();
  }
void nux::BasePainter::Paint2DQuadColor ( GraphicsEngine graphics_engine,
const Geometry g,
const Color &  c0 
) const

Definition at line 287 of file Painter.cpp.

  {
    graphics_engine.QRP_Color(g.x, g.y, g.GetWidth(), g.GetHeight(), c0);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::BasePainter::Paint2DQuadColor ( GraphicsEngine graphics_engine,
const Geometry g,
const Color &  c0_top_left,
const Color &  c1_bottom_left,
const Color &  c2_bottom_right,
const Color &  c3_top_right 
) const

Definition at line 292 of file Painter.cpp.

  {
    graphics_engine.QRP_Color(g.x, g.y, g.GetWidth(), g.GetHeight(), c0_top_left, c1_bottom_left, c2_bottom_right, c3_top_right);
  }

Here is the call graph for this function:

void nux::BasePainter::Paint2DQuadColor ( GraphicsEngine graphics_engine,
int  x,
int  y,
int  width,
int  height,
const Color &  c0 
) const

Definition at line 297 of file Painter.cpp.

  {
    graphics_engine.QRP_Color(x, y, width, height, c0);
  }

Here is the call graph for this function:

void nux::BasePainter::Paint2DQuadColor ( GraphicsEngine graphics_engine,
int  x,
int  y,
int  width,
int  height,
const Color &  c0_top_left,
const Color &  c1_bottom_left,
const Color &  c2_bottom_right,
const Color &  c3_top_right 
) const

Definition at line 303 of file Painter.cpp.

  {
    graphics_engine.QRP_Color(x, y, width, height, c0_top_left, c1_bottom_left, c2_bottom_right, c3_top_right);
  }

Here is the call graph for this function:

void nux::BasePainter::Paint2DQuadHGradient ( GraphicsEngine graphics_engine,
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.

Parameters:
gGeometry of the quad.
LeftColorcolor at the top of the quad.
RightColorcolor at the bottom of the quad.

Definition at line 313 of file Painter.cpp.

  {
    Paint2DQuadColor(graphics_engine, g, LeftColor, LeftColor, RightColor, LeftColor);
  }

Here is the call graph for this function:

void nux::BasePainter::Paint2DQuadVGradient ( GraphicsEngine graphics_engine,
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.

Parameters:
gGeometry of the quad.
TopColorcolor at the top of the quad.
TopColorcolor at the bottom of the quad.

Definition at line 308 of file Painter.cpp.

  {
    Paint2DQuadColor(graphics_engine, g, TopColor, BottomColor, BottomColor, TopColor);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::BasePainter::Paint2DQuadWireframe ( GraphicsEngine graphics_engine,
const Geometry g,
Color  c0 
) const

Definition at line 322 of file Painter.cpp.

  {
    graphics_engine.QRP_QuadWireframe(g.x, g.y, g.GetWidth(), g.GetHeight(), c0, c0, c0, c0);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::BasePainter::Paint2DQuadWireframe ( GraphicsEngine graphics_engine,
const Geometry g,
Color  c_top_left,
Color  c_bottom_left,
Color  c_bottom_right,
Color  c_top_right 
) const

Definition at line 332 of file Painter.cpp.

  {
    graphics_engine.QRP_QuadWireframe(g.x, g.y, g.GetWidth(), g.GetHeight(), c_top_left, c_bottom_left, c_bottom_right, c_top_right);
  }

Here is the call graph for this function:

void nux::BasePainter::Paint2DQuadWireframe ( GraphicsEngine graphics_engine,
int  x,
int  y,
int  width,
int  height,
Color  c0 
) const

Definition at line 337 of file Painter.cpp.

  {
    graphics_engine.QRP_QuadWireframe(x, y, width, height, c0, c0, c0, c0);
  }

Here is the call graph for this function:

void nux::BasePainter::Paint2DQuadWireframe ( GraphicsEngine graphics_engine,
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

Definition at line 347 of file Painter.cpp.

  {
    graphics_engine.QRP_QuadWireframe(x, y, width, height, c_top_left, c_bottom_left, c_bottom_right, c_top_right);
  }

Here is the call graph for this function:

void nux::BasePainter::PaintActivePaintLayerStack ( GraphicsEngine graphics_engine,
const Geometry geo 
)

Paint all the layers in the active paint layer stack.

void nux::BasePainter::PaintBackground ( GraphicsEngine graphics_engine,
const Geometry geo 
)

Deprecated. Use PaintActivePaintLayerStack.

Definition at line 800 of file Painter.cpp.

  {
    if (active_paint_layer_stack_.empty())
    {
      return;
    }

    std::list<AbstractPaintLayer *>::const_reverse_iterator rev_it;

    bool first = true;

    for (rev_it = active_paint_layer_stack_.rbegin(); rev_it != active_paint_layer_stack_.rend(); rev_it++)
    {
      AbstractPaintLayer *layer = (*rev_it);
      Geometry layer_geo = layer->GetGeometry();
      Geometry xform_geo = graphics_engine.ModelViewXFormRect(geo);

      graphics_engine.PushClippingRectangle(geo);
      graphics_engine.SetModelViewMatrix(layer->GetModelViewMatrix());

      if (first)
      {
        Paint2DQuadColor(graphics_engine, layer_geo, Color(0x0));
        first = false;
      }

      RenderSinglePaintLayer(graphics_engine, layer_geo, layer);

      // restore the model view matrix stack and the clipping rectangle stack.
      graphics_engine.ApplyModelViewMatrix();
      graphics_engine.PopClippingRectangle();
    }
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::BasePainter::PaintCheckBox ( GraphicsEngine graphics_engine,
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.

Definition at line 705 of file Painter.cpp.

  {

    GeometryPositioning pctx(eHACenter, eVACenter);
    pctx.m_stretch_horizontal = false;
    pctx.m_stretch_vertical = false;

    const PainterImage *pimage = GetTheme().GetImage(eCHECKBOX_NORMAL_ON);

    if (pimage == 0)
      return;

    BaseTexture *texture = pimage->texture;
    Geometry content_geo(0, 0, texture->GetWidth(), texture->GetHeight()) ;
    content_geo = ComputeGeometryPositioning(geo, content_geo, pctx);

    graphics_engine.GetRenderStates().SetBlend(true, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

    if (interaction_state.is_focus && interaction_state.is_on)
    {
      Draw2DTexture(graphics_engine, GetTheme().GetImage(eCHECKBOX_FOCUS_ON)->texture, content_geo.x, content_geo.y);
    }
    else if (interaction_state.is_focus && !interaction_state.is_on)
    {
      Draw2DTexture(graphics_engine, GetTheme().GetImage(eCHECKBOX_FOCUS_OFF)->texture, content_geo.x, content_geo.y);
    }
    else if (interaction_state.is_prelight && interaction_state.is_on)
    {
      Draw2DTexture(graphics_engine, GetTheme().GetImage(eCHECKBOX_PRELIGHT_ON)->texture, content_geo.x, content_geo.y);
    }
    else if (interaction_state.is_prelight && !interaction_state.is_on)
    {
      Draw2DTexture(graphics_engine, GetTheme().GetImage(eCHECKBOX_PRELIGHT_OFF)->texture, content_geo.x, content_geo.y);
    }
    else if (interaction_state.is_on)
    {
      Draw2DTexture(graphics_engine, GetTheme().GetImage(eCHECKBOX_NORMAL_ON)->texture, content_geo.x, content_geo.y);
    }
    else
    {
      Draw2DTexture(graphics_engine, GetTheme().GetImage(eCHECKBOX_NORMAL_OFF)->texture, content_geo.x, content_geo.y);
    }

    graphics_engine.GetRenderStates().SetBlend(false);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

int nux::BasePainter::PaintColorTextLineEdit ( GraphicsEngine graphics_engine,
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]

Definition at line 179 of file Painter.cpp.

  {
    PageBBox page;
    page.xmin = g.x;
    page.xmax = g.x + g.GetWidth();
    page.ymin = g.y;
    page.ymax = g.y + g.GetHeight();
    page.x_margin = DEFAULT_TEXT_X_MARGIN;
    page.y_margin = DEFAULT_TEXT_Y_MARGIN;
    return graphics_engine.RenderColorTextLineEdit(GetSysFont(), page, Str,
           TextColor,
           WriteAlphaChannel,
           SelectedTextColor,
           SelectedTextBackgroundColor,
           TextBlinkColor,
           CursorColor,
           ShowCursor, CursorPosition, offset, selection_start, selection_end);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::BasePainter::PaintHorizontalGradientQuad ( GraphicsEngine graphics_engine,
const Geometry geo,
int  num_color,
float *  percentage_array,
Color *  color_array 
)

Definition at line 692 of file Painter.cpp.

  {
    for (int i = 0; i < array_size - 1; i++)
    {
      float p0 = percentage_array[i] / 100.0f;
      float p1 = percentage_array[i+1] / 100.0f;

      Paint2DQuadColor(graphics_engine, geo.x, geo.y + geo.GetHeight() * p0, geo.GetWidth(), geo.GetHeight() * p1 - geo.GetHeight() * p0,
                        color_array[i], color_array[i],
                        color_array[i+1], color_array[i+1]);
    }
  }

Here is the call graph for this function:

void nux::BasePainter::PaintRadioButton ( GraphicsEngine graphics_engine,
const Geometry geo,
const InteractState interaction_state,
Color  check_mark_color = Color(0x0),
Color  check_box_color = Color(0x0) 
)

Definition at line 752 of file Painter.cpp.

  {
    PaintBackground(graphics_engine, geo);
    GeometryPositioning pctx(eHACenter, eVACenter);
    pctx.m_stretch_horizontal = false;
    pctx.m_stretch_vertical = false;

    const PainterImage *pimage = GetTheme().GetImage(eRADIO_NORMAL_ON);

    if (pimage == 0)
      return;

    BaseTexture *texture = pimage->texture;

    Geometry content_geo(0, 0, texture->GetWidth(), texture->GetHeight()) ;
    content_geo = ComputeGeometryPositioning(geo, content_geo, pctx);

    graphics_engine.GetRenderStates().SetBlend(true, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

    if (interaction_state.is_focus && interaction_state.is_on)
    {
      Draw2DTexture(graphics_engine, GetTheme().GetImage(eRADIO_FOCUS_ON)->texture, content_geo.x, content_geo.y);
    }
    else if (interaction_state.is_focus && !interaction_state.is_on)
    {
      Draw2DTexture(graphics_engine, GetTheme().GetImage(eRADIO_FOCUS_OFF)->texture, content_geo.x, content_geo.y);
    }
    else if (interaction_state.is_prelight && interaction_state.is_on)
    {
      Draw2DTexture(graphics_engine, GetTheme().GetImage(eRADIO_PRELIGHT_ON)->texture, content_geo.x, content_geo.y);
    }
    else if (interaction_state.is_prelight && !interaction_state.is_on)
    {
      Draw2DTexture(graphics_engine, GetTheme().GetImage(eRADIO_PRELIGHT_OFF)->texture, content_geo.x, content_geo.y);
    }
    else if (interaction_state.is_on)
    {
      Draw2DTexture(graphics_engine, GetTheme().GetImage(eRADIO_NORMAL_ON)->texture, content_geo.x, content_geo.y);
    }
    else
    {
      Draw2DTexture(graphics_engine, GetTheme().GetImage(eRADIO_NORMAL_OFF)->texture, content_geo.x, content_geo.y);
    }

    graphics_engine.GetRenderStates().SetBlend(false);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::BasePainter::PaintShape ( GraphicsEngine graphics_engine,
const Geometry geo,
const Color &  c0,
UXStyleImageRef  style,
bool  WriteAlpha = true 
) const

Definition at line 390 of file Painter.cpp.

  {
    ROPConfig ROP;
    ROP.Blend = true;
    ROP.SrcBlend = GL_SRC_ALPHA;
    ROP.DstBlend = GL_ONE_MINUS_SRC_ALPHA;
    PaintShapeCornerROP(graphics_engine, geo, c0, style, eCornerTopLeft | eCornerTopRight | eCornerBottomLeft | eCornerBottomRight, WriteAlpha, ROP);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::BasePainter::PaintShapeCorner ( GraphicsEngine graphics_engine,
const Geometry geo,
const Color &  c0,
UXStyleImageRef  style,
long  corners,
bool  WriteAlpha = true 
) const

Definition at line 403 of file Painter.cpp.

  {
    ROPConfig ROP;
    ROP.Blend = true;
    ROP.SrcBlend = GL_SRC_ALPHA;
    ROP.DstBlend = GL_ONE_MINUS_SRC_ALPHA;
    PaintShapeCornerROP(graphics_engine, geo, c0, style, corners, WriteAlpha, ROP);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::BasePainter::PaintShapeCornerROP ( GraphicsEngine graphics_engine,
const Geometry geo,
const Color &  c0,
UXStyleImageRef  style,
long  corners,
bool  WriteAlpha = true,
const ROPConfig ROP = ROPConfig::Default 
) const

Definition at line 426 of file Painter.cpp.

  {
    const PainterImage *pimage = GetTheme().GetImage(style);

    if (pimage == 0)
      return;

    BaseTexture *texture = pimage->texture;

    int border_left = pimage->border_left;
    int border_right = pimage->border_right;
    int border_top = pimage->border_top;
    int border_bottom = pimage->border_bottom;
    bool draw_borders_only = pimage->draw_borders_only;
    unsigned int current_alpha_blend;
    unsigned int current_src_blend_factor;
    unsigned int current_dest_blend_factor;
    unsigned int current_red_mask;
    unsigned int current_green_mask;
    unsigned int current_blue_mask;
    unsigned int current_alpha_mask;

    // Get the current color mask and blend states. They will be restored later.
    graphics_engine.GetRenderStates().GetColorMask(current_red_mask, current_green_mask, current_blue_mask, current_alpha_mask);
    graphics_engine.GetRenderStates().GetBlend(current_alpha_blend, current_src_blend_factor, current_dest_blend_factor);


    graphics_engine.GetRenderStates().SetColorMask(GL_TRUE, GL_TRUE, GL_TRUE, WriteAlpha ? GL_TRUE : GL_FALSE);
    graphics_engine.GetRenderStates().SetBlend(ROP.Blend, ROP.SrcBlend, ROP.DstBlend);

    int tex_w = texture->GetWidth();
    int tex_h = texture->GetHeight();

    int r_x = geo.x;
    int r_y = geo.y;
    int r_w = geo.GetWidth();
    int r_h = geo.GetHeight();

    TexCoordXForm texxform;
    texxform.SetTexCoordType(TexCoordXForm::UNNORMALIZED_COORD);

    if (r_w < border_left + border_right)
    {
      // Do not apply this correction: just show the drawing as it is;
      //border_left = border_right = 0;
    }

    if (r_h < border_top + border_bottom)
    {
      // Do not apply this correction: just show the drawing as it is;
      //border_top = border_bottom = 0;
    }

    // Draw TOP-LEFT CORNER
    if (corners & eCornerTopLeft)
    {
      texxform.u0 = 0;
      texxform.v0 = 0;
      texxform.u1 = border_left;
      texxform.v1 = border_top;
      graphics_engine.QRP_ColorModTexAlpha(r_x, r_y, border_left, border_top, texture->GetDeviceTexture(), texxform, c0);
    }
    else
    {
      graphics_engine.QRP_Color(r_x, r_y, border_left, border_top, c0);
    }

    // Draw TOP-RIGHT CORNER
    if (corners & eCornerTopRight)
    {
      texxform.u0 = tex_w - border_right;
      texxform.v0 = 0;
      texxform.u1 = tex_w;
      texxform.v1 = border_top;
      graphics_engine.QRP_ColorModTexAlpha(r_x + r_w - border_right, r_y, border_right, border_top, texture->GetDeviceTexture(), texxform, c0);
    }
    else
    {
      graphics_engine.QRP_Color(r_x + r_w - border_right, r_y, border_right, border_top, c0);
    }

    // Draw BOTTOM-LEFT CORNER
    if (corners & eCornerBottomLeft)
    {
      texxform.u0 = 0;
      texxform.v0 = tex_h - border_bottom;
      texxform.u1 = border_left;
      texxform.v1 = tex_h;
      graphics_engine.QRP_ColorModTexAlpha(r_x, r_y + r_h - border_bottom, border_left, border_bottom, texture->GetDeviceTexture(), texxform, c0);
    }
    else
    {
      graphics_engine.QRP_Color(r_x, r_y + r_h - border_bottom, border_left, border_bottom, c0);
    }

    // Draw BOTTOM-RIGHT CORNER
    if (corners & eCornerBottomRight)
    {
      texxform.u0 = tex_w - border_right;
      texxform.v0 = tex_h - border_bottom;
      texxform.u1 = tex_w;
      texxform.v1 = tex_h;
      graphics_engine.QRP_ColorModTexAlpha(r_x + r_w - border_right, r_y + r_h - border_bottom, border_right, border_bottom, texture->GetDeviceTexture(), texxform, c0);
    }
    else
    {
      graphics_engine.QRP_Color(r_x + r_w - border_right, r_y + r_h - border_bottom, border_right, border_bottom, c0);
    }

    texxform.u0 = border_left;
    texxform.v0 = 0;
    texxform.u1 = tex_w - border_right;
    texxform.v1 = border_top;
    graphics_engine.QRP_ColorModTexAlpha(r_x + border_left, r_y, r_w - border_left - border_right, border_top, texture->GetDeviceTexture(), texxform, c0);
    // Draw BOTTOM BORDER
    texxform.u0 = border_left;
    texxform.v0 = tex_h - border_bottom;
    texxform.u1 = tex_w - border_right;
    texxform.v1 = tex_h;
    graphics_engine.QRP_ColorModTexAlpha(r_x + border_left, r_y + r_h - border_bottom, r_w - border_left - border_right, border_bottom, texture->GetDeviceTexture(), texxform, c0);
    // Draw LEFT BORDER
    texxform.u0 = 0;
    texxform.v0 = border_top;
    texxform.u1 = border_left;
    texxform.v1 = tex_h - border_bottom;
    graphics_engine.QRP_ColorModTexAlpha(r_x, r_y + border_top, border_left, r_h - border_top - border_bottom, texture->GetDeviceTexture(), texxform, c0);
    // Draw RIGHT BORDER
    texxform.u0 = tex_w - border_right;
    texxform.v0 = border_top;
    texxform.u1 = tex_w;
    texxform.v1 = tex_h - border_bottom;
    graphics_engine.QRP_ColorModTexAlpha(r_x + r_w - border_right, r_y + border_top, border_right, r_h - border_top - border_bottom, texture->GetDeviceTexture(), texxform, c0);

    // Draw CENTER
    if (draw_borders_only == false)
    {
      texxform.u0 = border_left;
      texxform.v0 = border_top;
      texxform.u1 = tex_w - border_right;
      texxform.v1 = tex_h - border_bottom;
      graphics_engine.QRP_ColorModTexAlpha(r_x + border_left, r_y + border_top, r_w - border_left - border_right, r_h - border_top - border_bottom, texture->GetDeviceTexture(), texxform, c0);
    }

    // Restore Color mask and blend states.
    graphics_engine.GetRenderStates().SetColorMask(current_red_mask, current_green_mask, current_blue_mask, current_alpha_mask);
    graphics_engine.GetRenderStates().SetBlend(current_alpha_blend, current_src_blend_factor, current_dest_blend_factor);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::BasePainter::PaintShapeROP ( GraphicsEngine graphics_engine,
const Geometry geo,
const Color &  c0,
UXStyleImageRef  style,
bool  WriteAlpha = true,
const ROPConfig ROP = ROPConfig::Default 
) const

Definition at line 417 of file Painter.cpp.

  {
    PaintShapeCornerROP(graphics_engine, geo, c0, style, eCornerTopLeft | eCornerTopRight | eCornerBottomLeft | eCornerBottomRight, WriteAlpha, ROP);
  }

Here is the call graph for this function:

int nux::BasePainter::PaintTextLineStatic ( GraphicsEngine graphics_engine,
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]

Definition at line 207 of file Painter.cpp.

  {
    PageBBox page;
    page.xmin = g.x;
    page.xmax = g.x + g.GetWidth();
    page.ymin = g.y;
    page.ymax = g.y + g.GetHeight();
    page.x_margin = DEFAULT_TEXT_X_MARGIN;
    page.y_margin = DEFAULT_TEXT_Y_MARGIN;
    return graphics_engine.RenderColorTextLineStatic(Font, page, Str, color, WriteAlphaChannel, alignment);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::BasePainter::PaintTextureShape ( GraphicsEngine graphics_engine,
const Geometry geo,
UXStyleImageRef  style 
) const

Definition at line 580 of file Painter.cpp.

  {
    const PainterImage *pimage = GetTheme().GetImage(style);

    if (pimage == 0)
      return;

    BaseTexture *texture = pimage->texture;


    int border_left = pimage->border_left;
    int border_right = pimage->border_right;
    int border_top = pimage->border_top;
    int border_bottom = pimage->border_bottom;
    bool draw_borders_only = pimage->draw_borders_only;

    PaintTextureShape(graphics_engine, geo, texture,
                       border_left, border_right, border_top, border_bottom, draw_borders_only);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::BasePainter::PaintTextureShape ( GraphicsEngine graphics_engine,
const Geometry geo,
BaseTexture Texture,
int  border_left,
int  border_right,
int  border_top,
int  border_bottom,
bool  draw_borders_only,
bool  premultiply = true 
) const

Definition at line 600 of file Painter.cpp.

  {
    int tex_w = texture->GetWidth();
    int tex_h = texture->GetHeight();

    int r_x = geo.x;
    int r_y = geo.y;
    int r_w = geo.GetWidth();
    int r_h = geo.GetHeight();

    if (r_w < border_left + border_right)
    {
      border_left = border_right = 0;
    }

    if (r_h < border_top + border_bottom)
    {
      border_top = border_bottom = 0;
    }

    if (premultiply)
      graphics_engine.GetRenderStates().SetBlend(TRUE, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
    else
      graphics_engine.GetRenderStates().SetBlend(TRUE, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

    TexCoordXForm texxform;
    texxform.SetTexCoordType(TexCoordXForm::UNNORMALIZED_COORD);

    // Draw TOP-LEFT CORNER
    texxform.u0 = 0;
    texxform.v0 = 0;
    texxform.u1 = border_left;
    texxform.v1 = border_top;
    graphics_engine.QRP_1Tex(r_x, r_y, border_left, border_top, texture->GetDeviceTexture(), texxform, color::White);
    // Draw TOP-RIGHT CORNER
    texxform.u0 = tex_w - border_right;
    texxform.v0 = 0;
    texxform.u1 = tex_w;
    texxform.v1 = border_top;
    graphics_engine.QRP_1Tex(r_x + r_w - border_right, r_y, border_right, border_top, texture->GetDeviceTexture(), texxform, color::White);
    // Draw BOTTOM-LEFT CORNER
    texxform.u0 = 0;
    texxform.v0 = tex_h - border_bottom;
    texxform.u1 = border_left;
    texxform.v1 = tex_h;
    graphics_engine.QRP_1Tex(r_x, r_y + r_h - border_bottom, border_left, border_bottom, texture->GetDeviceTexture(), texxform, color::White);
    // Draw BOTTOM-RIGHT CORNER
    texxform.u0 = tex_w - border_right;
    texxform.v0 = tex_h - border_bottom;
    texxform.u1 = tex_w;
    texxform.v1 = tex_h;
    graphics_engine.QRP_1Tex(r_x + r_w - border_right, r_y + r_h - border_bottom, border_right, border_bottom, texture->GetDeviceTexture(), texxform, color::White);
    // Draw TOP BORDER
    texxform.u0 = border_left;
    texxform.v0 = 0;
    texxform.u1 = tex_w - border_right;
    texxform.v1 = border_top;
    graphics_engine.QRP_1Tex(r_x + border_left, r_y, r_w - border_left - border_right, border_top, texture->GetDeviceTexture(), texxform, color::White);
    // Draw BOTTOM BORDER
    texxform.u0 = border_left;
    texxform.v0 = tex_h - border_bottom;
    texxform.u1 = tex_w - border_right;
    texxform.v1 = tex_h;
    graphics_engine.QRP_1Tex(r_x + border_left, r_y + r_h - border_bottom, r_w - border_left - border_right, border_bottom, texture->GetDeviceTexture(), texxform, color::White);
    // Draw LEFT BORDER
    texxform.u0 = 0;
    texxform.v0 = border_top;
    texxform.u1 = border_left;
    texxform.v1 = tex_h - border_bottom;
    graphics_engine.QRP_1Tex(r_x, r_y + border_top, border_left, r_h - border_top - border_bottom, texture->GetDeviceTexture(), texxform, color::White);
    // Draw RIGHT BORDER
    texxform.u0 = tex_w - border_right;
    texxform.v0 = border_top;
    texxform.u1 = tex_w;
    texxform.v1 = tex_h - border_bottom;
    graphics_engine.QRP_1Tex(r_x + r_w - border_right, r_y + border_top, border_right, r_h - border_top - border_bottom, texture->GetDeviceTexture(), texxform, color::White);

    // Draw CENTER
    if (draw_borders_only == false)
    {
      texxform.u0 = border_left;
      texxform.v0 = border_top;
      texxform.u1 = tex_w - border_right;
      texxform.v1 = tex_h - border_bottom;
      graphics_engine.QRP_1Tex(r_x + border_left, r_y + border_top, r_w - border_left - border_right, r_h - border_top - border_bottom, texture->GetDeviceTexture(), texxform, color::White);
    }

    graphics_engine.GetRenderStates().SetBlend(FALSE);
  }

Here is the call graph for this function:

void nux::BasePainter::PopBackground ( int  level = 1)

Deprecated. Use PopPaintLayer.

Definition at line 1080 of file Painter.cpp.

  {
    PopPaintLayer(level);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

Deprecated. Use PopPaintLayerStack.

Definition at line 1142 of file Painter.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::BasePainter::PopPaintLayer ( int  level = 1)

Pop the top most paint layers from the active paint layer stack.

Pop the top most paint layers from the active paint layer stack.

Parameters:
levelThe number of layer to pop off.

Definition at line 1085 of file Painter.cpp.

  {
    nuxAssert(level >= 0);

    while ((level >= 1) && (active_paint_layer_stack_.size() > 0))
    {
      AbstractPaintLayer *paint_layer = (*active_paint_layer_stack_.begin());
      delete paint_layer;
      active_paint_layer_stack_.pop_front();
      level--;
    }
  }

Here is the caller graph for this function:

Pop a previously pushed paint layer stack.

Definition at line 1147 of file Painter.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Deprecated. Use PushPaintLayerStack.

Definition at line 1131 of file Painter.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::BasePainter::PushColorizeTextureLayer ( GraphicsEngine graphics_engine,
Geometry  geo,
ObjectPtr< IOpenGLBaseTexture DeviceTexture,
TexCoordXForm  texxform,
const Color &  color,
bool  WriteAlpha,
const ROPConfig ROP,
const Color &  blend_color,
LayerBlendMode  layer_blend_mode 
)

Definition at line 1041 of file Painter.cpp.

  {
    TextureLayer *tl = new TextureLayer(DeviceTexture, texxform, color, WriteAlpha, ROP, blend_color, layer_blend_mode);
    tl->SetModelViewMatrix(window_thread_->GetGraphicsEngine().GetModelViewMatrix());
    tl->SetGeometry(geo);
    active_paint_layer_stack_.push_front(tl);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::BasePainter::PushColorLayer ( GraphicsEngine graphics_engine,
const Geometry geo,
Color  color,
bool  WriteAlpha = false,
const ROPConfig ROP = ROPConfig::Default 
)

Definition at line 853 of file Painter.cpp.

  {
    ColorLayer *cl = new ColorLayer(color, WriteAlpha, ROP);
    cl->SetModelViewMatrix(window_thread_->GetGraphicsEngine().GetModelViewMatrix());
    cl->SetGeometry(geo);
    active_paint_layer_stack_.push_front(cl);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::BasePainter::PushCompositionLayer ( GraphicsEngine graphics_engine,
Geometry  geo,
ObjectPtr< IOpenGLBaseTexture texture0,
TexCoordXForm  texxform0,
const Color &  color0,
ObjectPtr< IOpenGLBaseTexture texture1,
TexCoordXForm  texxform1,
const Color &  color1,
LayerBlendMode  layer_blend_mode,
bool  WriteAlpha,
const ROPConfig ROP 
)

Definition at line 934 of file Painter.cpp.

  {
    CompositionLayer *cl = new CompositionLayer (texture0, texxform0, color0,
                                           texture1, texxform1, color1,
                                           layer_blend_mode, WriteAlpha, ROP);
    cl->SetModelViewMatrix(window_thread_->GetGraphicsEngine().GetModelViewMatrix());
    cl->SetGeometry(geo);
    
    active_paint_layer_stack_.push_front(cl);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::BasePainter::PushCompositionLayer ( GraphicsEngine graphics_engine,
Geometry  geo,
ObjectPtr< IOpenGLBaseTexture texture0,
TexCoordXForm  texxform0,
const Color &  color0,
const Color &  blend_color,
LayerBlendMode  layer_blend_mode,
bool  WriteAlpha,
const ROPConfig ROP 
)

Definition at line 955 of file Painter.cpp.

  {
    CompositionLayer *cl = new CompositionLayer (texture0, texxform0, color0, blend_color,
                                           layer_blend_mode, WriteAlpha, ROP);
    cl->SetModelViewMatrix(window_thread_->GetGraphicsEngine().GetModelViewMatrix());
    cl->SetGeometry(geo);

    active_paint_layer_stack_.push_front(cl);
  }

Here is the call graph for this function:

void nux::BasePainter::PushCompositionLayer ( GraphicsEngine graphics_engine,
Geometry  geo,
const Color &  base_color,
ObjectPtr< IOpenGLBaseTexture texture0,
TexCoordXForm  texxform0,
const Color &  color0,
LayerBlendMode  layer_blend_mode,
bool  WriteAlpha,
const ROPConfig ROP 
)

Definition at line 973 of file Painter.cpp.

  {
    CompositionLayer *cl = new CompositionLayer (base_color, texture0, texxform0,
                                           color0, layer_blend_mode,
                                           WriteAlpha, ROP);

    cl->SetModelViewMatrix(window_thread_->GetGraphicsEngine().GetModelViewMatrix());
    cl->SetGeometry(geo);

    active_paint_layer_stack_.push_front(cl);
  }

Here is the call graph for this function:

void nux::BasePainter::PushDrawColorizeTextureLayer ( GraphicsEngine graphics_engine,
Geometry  geo,
ObjectPtr< IOpenGLBaseTexture DeviceTexture,
TexCoordXForm  texxform,
const Color &  color,
bool  WriteAlpha,
const ROPConfig ROP,
const Color &  blend_color,
LayerBlendMode  layer_blend_mode 
)

Definition at line 1067 of file Painter.cpp.

  {
    PushColorizeTextureLayer(graphics_engine, geo, DeviceTexture, texxform, color, WriteAlpha, ROP, blend_color, layer_blend_mode);
    PaintBackground(graphics_engine, geo);
  }

Here is the call graph for this function:

void nux::BasePainter::PushDrawColorLayer ( GraphicsEngine graphics_engine,
const Geometry geo,
Color  color,
bool  WriteAlpha = false,
const ROPConfig ROP = ROPConfig::Default 
)

Definition at line 864 of file Painter.cpp.

  {
    PushColorLayer(graphics_engine, geo, color, WriteAlpha, ROP);
    PaintBackground(graphics_engine, geo);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::BasePainter::PushDrawCompositionLayer ( GraphicsEngine graphics_engine,
Geometry  geo,
ObjectPtr< IOpenGLBaseTexture texture0,
TexCoordXForm  texxform0,
const Color &  color0,
ObjectPtr< IOpenGLBaseTexture texture1,
TexCoordXForm  texxform1,
const Color &  color1,
LayerBlendMode  layer_blend_mode,
bool  WriteAlpha,
const ROPConfig ROP 
)

Definition at line 1009 of file Painter.cpp.

  {
    PushCompositionLayer(graphics_engine, geo, texture0, texxform0,
                      color0, texture1, texxform1, color1, layer_blend_mode,
                      WriteAlpha, ROP);
    PaintBackground(graphics_engine, geo);
  }

Here is the call graph for this function:

void nux::BasePainter::PushDrawCompositionLayer ( GraphicsEngine graphics_engine,
Geometry  geo,
ObjectPtr< IOpenGLBaseTexture texture0,
TexCoordXForm  texxform0,
const Color &  color0,
const Color &  blend_color,
LayerBlendMode  layer_blend_mode,
bool  WriteAlpha,
const ROPConfig ROP 
)

Definition at line 994 of file Painter.cpp.

  {
    PushCompositionLayer(graphics_engine, geo, texture0, texxform0,
                      color0, blend_color, layer_blend_mode, WriteAlpha, ROP);
    PaintBackground(graphics_engine, geo);
  }

Here is the call graph for this function:

void nux::BasePainter::PushDrawCompositionLayer ( GraphicsEngine graphics_engine,
Geometry  geo,
const Color &  base_color,
ObjectPtr< IOpenGLBaseTexture texture0,
TexCoordXForm  texxform0,
const Color &  color0,
LayerBlendMode  layer_blend_mode,
bool  WriteAlpha,
const ROPConfig ROP 
)

Definition at line 1027 of file Painter.cpp.

  {
    PushCompositionLayer(graphics_engine, geo, base_color, texture0,
                      texxform0, color0, layer_blend_mode, WriteAlpha, ROP);
  }

Here is the call graph for this function:

void nux::BasePainter::PushDrawLayer ( GraphicsEngine graphics_engine,
const Geometry geo,
AbstractPaintLayer layer 
)

Definition at line 847 of file Painter.cpp.

  {
    PushLayer(graphics_engine, geo, layer);
    PaintBackground(graphics_engine, geo);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::BasePainter::PushDrawShapeLayer ( GraphicsEngine graphics_engine,
Geometry  geo,
UXStyleImageRef  imageStyle,
const Color &  color,
unsigned long  Corners = eAllCorners,
bool  WriteAlpha = false,
const ROPConfig ROP = ROPConfig::Default 
)

Definition at line 886 of file Painter.cpp.

  {
    PushShapeLayer(graphics_engine, geo, imageStyle, color, Corners, WriteAlpha, ROP);
    PaintBackground(graphics_engine, geo);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::BasePainter::PushDrawSliceScaledTextureLayer ( GraphicsEngine graphics_engine,
Geometry  geo,
UXStyleImageRef  imageStyle,
const Color &  color,
unsigned long  Corners = eAllCorners,
bool  WriteAlpha = false,
const ROPConfig ROP = ROPConfig::Default 
)

Definition at line 910 of file Painter.cpp.

  {
    PushSliceScaledTextureLayer(graphics_engine, geo, imageStyle, color, Corners, WriteAlpha, ROP);
    PaintBackground(graphics_engine, geo);
  }

Here is the call graph for this function:

void nux::BasePainter::PushDrawTextureLayer ( GraphicsEngine graphics_engine,
Geometry  geo,
ObjectPtr< IOpenGLBaseTexture DeviceTexture,
TexCoordXForm  texxform,
const Color &  color,
bool  WriteAlpha = false,
const ROPConfig ROP = ROPConfig::Default 
)

Definition at line 1056 of file Painter.cpp.

  {
    PushTextureLayer(graphics_engine, geo, DeviceTexture, texxform, color, WriteAlpha, ROP);
    PaintBackground(graphics_engine, geo);
  }

Here is the call graph for this function:

void nux::BasePainter::PushLayer ( GraphicsEngine graphics_engine,
const Geometry geo,
AbstractPaintLayer layer 
)

Definition at line 839 of file Painter.cpp.

  {
    AbstractPaintLayer *l = layer->Clone();
    l->SetModelViewMatrix(window_thread_->GetGraphicsEngine().GetModelViewMatrix());
    l->SetGeometry(geo);
    active_paint_layer_stack_.push_front(l);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

Push the current paint layer stack.

Definition at line 1136 of file Painter.cpp.

Here is the caller graph for this function:

void nux::BasePainter::PushShapeLayer ( GraphicsEngine graphics_engine,
Geometry  geo,
UXStyleImageRef  imageStyle,
const Color &  color,
unsigned long  Corners = eAllCorners,
bool  WriteAlpha = false,
const ROPConfig ROP = ROPConfig::Default 
)

Definition at line 873 of file Painter.cpp.

  {
    ShapeLayer *sl = new ShapeLayer(imageStyle, color, Corners, WriteAlpha, ROP);
    sl->SetModelViewMatrix(window_thread_->GetGraphicsEngine().GetModelViewMatrix());
    sl->SetGeometry(geo);
    active_paint_layer_stack_.push_front(sl);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::BasePainter::PushSliceScaledTextureLayer ( GraphicsEngine graphics_engine,
Geometry  geo,
UXStyleImageRef  imageStyle,
const Color &  color,
unsigned long  Corners = eAllCorners,
bool  WriteAlpha = false,
const ROPConfig ROP = ROPConfig::Default 
)

Definition at line 897 of file Painter.cpp.

  {
    SliceScaledTextureLayer *sl = new SliceScaledTextureLayer(imageStyle, color, Corners, WriteAlpha, ROP);
    sl->SetModelViewMatrix(window_thread_->GetGraphicsEngine().GetModelViewMatrix());
    sl->SetGeometry(geo);
    active_paint_layer_stack_.push_front(sl);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::BasePainter::PushTextureLayer ( GraphicsEngine graphics_engine,
Geometry  geo,
ObjectPtr< IOpenGLBaseTexture DeviceTexture,
TexCoordXForm  texxform,
const Color &  color,
bool  WriteAlpha = false,
const ROPConfig ROP = ROPConfig::Default 
)

Definition at line 921 of file Painter.cpp.

  {
    TextureLayer *tl = new TextureLayer(DeviceTexture, texxform, color, WriteAlpha, ROP);
    tl->SetModelViewMatrix(window_thread_->GetGraphicsEngine().GetModelViewMatrix());
    tl->SetGeometry(geo);
    active_paint_layer_stack_.push_front(tl);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::BasePainter::RenderSinglePaintLayer ( GraphicsEngine graphics_engine,
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.

Definition at line 834 of file Painter.cpp.

  {
    paint_layer->Renderlayer(graphics_engine);
  }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 449 of file Painter.h.

Definition at line 143 of file Painter.h.

Definition at line 450 of file Painter.h.

The WindowThread to which this object belongs.

Definition at line 452 of file Painter.h.


The documentation for this class was generated from the following files: