diff Framework/Scene2D/CairoCompositor.h @ 888:6e888cf6a48b

renderers now have access to canvas width/height
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 10 Jul 2019 11:58:38 +0200
parents c237e0625065
children 6e79e8c9021c 88bf49aebc13
line wrap: on
line diff
--- a/Framework/Scene2D/CairoCompositor.h	Tue Jun 25 18:17:33 2019 +0200
+++ b/Framework/Scene2D/CairoCompositor.h	Wed Jul 10 11:58:38 2019 +0200
@@ -44,16 +44,6 @@
 
     virtual cairo_t* GetCairoContext();
 
-    virtual unsigned int GetCairoWidth()
-    {
-      return canvas_.GetWidth();
-    }
-
-    virtual unsigned int GetCairoHeight()
-    {
-      return canvas_.GetHeight();
-    }
-    
     virtual Internals::CompositorHelper::ILayerRenderer* Create(const ISceneLayer& layer);
 
   public:
@@ -67,6 +57,16 @@
     {
       return canvas_;
     }
+
+    unsigned int GetCanvasWidth() const
+    {
+      return canvas_.GetWidth();
+    }
+
+    unsigned int GetCanvasHeight() const
+    {
+      return canvas_.GetHeight();
+    }
     
     void SetFont(size_t index,
                  GlyphBitmapAlphabet* dict);  // Takes ownership