~sil2100/nux/revert_640

« back to all changes in this revision

Viewing changes to Nux/TextureArea.cpp

  • Committer: Jay Taoko
  • Date: 2011-10-09 22:18:34 UTC
  • Revision ID: jay.taoko@canonical.com-20111009221834-9y890qzzj8rlp2r6
* Removing non-core UI views from Nux
* Refactoring in Layout
* Added LinearLayout.h/.cpp as a sub-class for HLayout and VLayout

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
      delete paint_layer_;
48
48
  }
49
49
 
50
 
  void TextureArea::Draw (GraphicsEngine &GfxContext, bool force_draw)
 
50
  void TextureArea::Draw (GraphicsEngine &graphics_engine, bool force_draw)
51
51
  {
52
52
    // Ability to rotate the widget around its center
53
 
    GfxContext.PushModelViewMatrix(Matrix4::TRANSLATE(-GetBaseX() - GetBaseWidth() / 2, -GetBaseY() - GetBaseHeight() / 2, 0));
54
 
    GfxContext.PushModelViewMatrix(Get2DRotation());
55
 
    GfxContext.PushModelViewMatrix(Matrix4::TRANSLATE(GetBaseX() + GetBaseWidth() / 2, GetBaseY() + GetBaseHeight() / 2, 0));
 
53
    graphics_engine.PushModelViewMatrix(Matrix4::TRANSLATE(-GetBaseX() - GetBaseWidth() / 2, -GetBaseY() - GetBaseHeight() / 2, 0));
 
54
    graphics_engine.PushModelViewMatrix(Get2DRotation());
 
55
    graphics_engine.PushModelViewMatrix(Matrix4::TRANSLATE(GetBaseX() + GetBaseWidth() / 2, GetBaseY() + GetBaseHeight() / 2, 0));
56
56
 
57
57
    // The TextureArea should not render the accumulated background. That is left to the caller.
58
 
    // GetPainter().PaintBackground (GfxContext, GetGeometry() );
 
58
    // GetPainter().PaintBackground (graphics_engine, GetGeometry() );
59
59
 
60
60
    if (paint_layer_)
61
61
    {
62
62
      paint_layer_->SetGeometry(GetGeometry());
63
 
      GetPainter().RenderSinglePaintLayer(GfxContext, GetGeometry(), paint_layer_);
 
63
      GetPainter().RenderSinglePaintLayer(graphics_engine, GetGeometry(), paint_layer_);
64
64
    }
65
65
 
66
 
    GfxContext.PopModelViewMatrix();
67
 
    GfxContext.PopModelViewMatrix();
68
 
    GfxContext.PopModelViewMatrix();
 
66
    graphics_engine.PopModelViewMatrix();
 
67
    graphics_engine.PopModelViewMatrix();
 
68
    graphics_engine.PopModelViewMatrix();
69
69
  }
70
70
 
71
 
  void TextureArea::DrawContent(GraphicsEngine &GfxContext, bool force_draw)
 
71
  void TextureArea::DrawContent(GraphicsEngine &graphics_engine, bool force_draw)
72
72
  {
73
73
 
74
74
  }
75
75
 
76
 
  void TextureArea::PostDraw(GraphicsEngine &GfxContext, bool force_draw)
 
76
  void TextureArea::PostDraw(GraphicsEngine &graphics_engine, bool force_draw)
77
77
  {
78
78
 
79
79
  }