diff OrthancStone/Sources/Scene2D/CairoCompositor.h @ 1576:92fca2b3ba3d

sanitizing the handling of canvas size
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 24 Sep 2020 16:40:30 +0200
parents 244ad1e4e76a
children 8563ea5d8ae4
line wrap: on
line diff
--- a/OrthancStone/Sources/Scene2D/CairoCompositor.h	Wed Sep 23 17:25:25 2020 +0200
+++ b/OrthancStone/Sources/Scene2D/CairoCompositor.h	Thu Sep 24 16:40:30 2020 +0200
@@ -59,11 +59,8 @@
       return canvas_;
     }
 
-    virtual void RefreshCanvasSize() ORTHANC_OVERRIDE
-    {
-      // The canvas size is constant in Cairo, except if
-      // "UpdateSize()" is called
-    }
+    virtual void SetCanvasSize(unsigned int canvasWidth,
+                               unsigned int canvasHeight) ORTHANC_OVERRIDE;
 
     virtual unsigned int GetCanvasWidth() const ORTHANC_OVERRIDE
     {
@@ -92,9 +89,6 @@
       helper_.reset(new Internals::CompositorHelper(*this));
     }
 
-    void UpdateSize(unsigned int canvasWidth,
-                    unsigned int canvasHeight);
-
     Orthanc::ImageAccessor* RenderText(size_t fontIndex,
                                        const std::string& utf8) const;
   };