comparison Framework/Scene2D/CairoCompositor.h @ 942:685c9a2d115f

Added missing ORTHANC_OVERRIDE + preparation for lost GL context handling + stubs for GL context event handlers
author Benjamin Golinvaux <bgo@osimis.io>
date Mon, 05 Aug 2019 12:27:27 +0200
parents 64e5f3ff6360
children d10d2acb8a02 2d8ab34c8c91
comparison
equal deleted inserted replaced
939:ab90628e70d9 942:685c9a2d115f
42 Fonts fonts_; 42 Fonts fonts_;
43 43
44 // Only valid during a call to "Refresh()" 44 // Only valid during a call to "Refresh()"
45 std::auto_ptr<CairoContext> context_; 45 std::auto_ptr<CairoContext> context_;
46 46
47 virtual cairo_t* GetCairoContext(); 47 virtual cairo_t* GetCairoContext() ORTHANC_OVERRIDE;
48 48
49 virtual Internals::CompositorHelper::ILayerRenderer* Create(const ISceneLayer& layer); 49 virtual Internals::CompositorHelper::ILayerRenderer* Create(const ISceneLayer& layer) ORTHANC_OVERRIDE;
50 50
51 public: 51 public:
52 CairoCompositor(const Scene2D& scene, 52 CairoCompositor(const Scene2D& scene,
53 unsigned int canvasWidth, 53 unsigned int canvasWidth,
54 unsigned int canvasHeight); 54 unsigned int canvasHeight);
58 const CairoSurface& GetCanvas() const 58 const CairoSurface& GetCanvas() const
59 { 59 {
60 return canvas_; 60 return canvas_;
61 } 61 }
62 62
63 virtual unsigned int GetCanvasWidth() const 63 virtual unsigned int GetCanvasWidth() const ORTHANC_OVERRIDE
64 { 64 {
65 return canvas_.GetWidth(); 65 return canvas_.GetWidth();
66 } 66 }
67 67
68 virtual unsigned int GetCanvasHeight() const 68 virtual unsigned int GetCanvasHeight() const ORTHANC_OVERRIDE
69 { 69 {
70 return canvas_.GetHeight(); 70 return canvas_.GetHeight();
71 } 71 }
72 72
73 void SetFont(size_t index, 73 void SetFont(size_t index,
74 GlyphBitmapAlphabet* dict); // Takes ownership 74 GlyphBitmapAlphabet* dict); // Takes ownership
75 75
76 #if ORTHANC_ENABLE_LOCALE == 1 76 #if ORTHANC_ENABLE_LOCALE == 1
77 virtual void SetFont(size_t index, 77 virtual void SetFont(size_t index,
78 Orthanc::EmbeddedResources::FileResourceId resource, 78 Orthanc::EmbeddedResources::FileResourceId resource,
79 unsigned int fontSize, 79 unsigned int fontSize,
80 Orthanc::Encoding codepage); 80 Orthanc::Encoding codepage) ORTHANC_OVERRIDE;
81 #endif 81 #endif
82 82
83 virtual void Refresh(); 83 virtual void Refresh() ORTHANC_OVERRIDE;
84 84
85 void UpdateSize(unsigned int canvasWidth, 85 void UpdateSize(unsigned int canvasWidth,
86 unsigned int canvasHeight); 86 unsigned int canvasHeight);
87 87
88 Orthanc::ImageAccessor* RenderText(size_t fontIndex, 88 Orthanc::ImageAccessor* RenderText(size_t fontIndex,