Browse Source

Cleanup, reorder cairo stuff to be first

Signed-off-by: falkTX <falktx@gmail.com>
pull/131/head
falkTX 5 years ago
parent
commit
56076b1a02
Signed by: falkTX <falktx@gmail.com> GPG Key ID: 2D3445A829213837
1 changed files with 8 additions and 8 deletions
  1. +8
    -8
      dgl/src/WidgetPrivateData.cpp

+ 8
- 8
dgl/src/WidgetPrivateData.cpp View File

@@ -16,12 +16,12 @@

#include "WidgetPrivateData.hpp"

#ifdef DGL_OPENGL
# include "../OpenGL.hpp"
#endif
#ifdef DGL_CAIRO
# include "../Cairo.hpp"
#endif
#ifdef DGL_OPENGL
# include "../OpenGL.hpp"
#endif

START_NAMESPACE_DGL

@@ -81,12 +81,16 @@ void Widget::PrivateData::display(const uint width,
cairo_matrix_t matrix;
cairo_get_matrix(cr, &matrix);
cairo_translate(cr, absolutePos.getX(), absolutePos.getY());
// TODO: scaling with cairo
// TODO: scaling and cropping
#endif

// display widget
self->onDisplay();

#ifdef DGL_CAIRO
cairo_set_matrix(cr, &matrix);
#endif

#ifdef DGL_OPENGL
if (needsDisableScissor)
{
@@ -95,10 +99,6 @@ void Widget::PrivateData::display(const uint width,
}
#endif

#ifdef DGL_CAIRO
cairo_set_matrix(cr, &matrix);
#endif

displaySubWidgets(width, height, scaling);
}



Loading…
Cancel
Save