aboutsummaryrefslogtreecommitdiff
path: root/dw/style.cc
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2013-09-15 14:59:06 +0200
committerSebastian Geerken <devnull@localhost>2013-09-15 14:59:06 +0200
commit2435de82b60cadb0283ef1636fbe078cf2beac0f (patch)
tree479915a54287c33e349912227b9c9944dd640586 /dw/style.cc
parent0ab5863987ec411ebf1ead15ff64de4b7766666e (diff)
Very simple implementation of ExternalImgRenderer (used to immediately draw imgbuf updates); concretization for widgets.
Diffstat (limited to 'dw/style.cc')
-rw-r--r--dw/style.cc22
1 files changed, 22 insertions, 0 deletions
diff --git a/dw/style.cc b/dw/style.cc
index fca8d5d1..2328c1e4 100644
--- a/dw/style.cc
+++ b/dw/style.cc
@@ -485,6 +485,28 @@ StyleImage::~StyleImage ()
delete styleImgRenderer;
}
+void StyleImage::ExternalImgRenderer::setBuffer (core::Imgbuf *buffer,
+ bool resize)
+{
+ // Nothing to do?
+}
+
+void StyleImage::ExternalImgRenderer::drawRow (int row)
+{
+ // Extremely simple implementation
+ Style *style;
+ if (readyToDraw () && (style = getStyle ())) {
+ int x, y, width, height;
+ getArea (&x, &y, &width, &height);
+ draw (x + style->margin.left + style->borderWidth.left,
+ y + style->margin.top + style->borderWidth.top,
+ width - style->margin.left - style->borderWidth.left
+ - style->margin.right - style->borderWidth.right,
+ height - style->margin.top - style->borderWidth.top
+ - style->margin.bottom - style->borderWidth.bottom);
+ }
+}
+
// ----------------------------------------------------------------------
/*