Mercurial > hg > orthanc-stone
comparison Framework/Viewport/CairoContext.h @ 365:ef31240a73f6 am-2
no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 31 Oct 2018 18:10:29 +0100 |
parents | 5a7915b23138 |
children | a7de01c8fd29 |
comparison
equal
deleted
inserted
replaced
364:aad2f9293089 | 365:ef31240a73f6 |
---|---|
21 | 21 |
22 #pragma once | 22 #pragma once |
23 | 23 |
24 #include "CairoSurface.h" | 24 #include "CairoSurface.h" |
25 | 25 |
26 #include <Core/Images/Font.h> | |
27 | |
26 namespace OrthancStone | 28 namespace OrthancStone |
27 { | 29 { |
28 // This is a RAII wrapper around the Cairo drawing context | 30 // This is a RAII wrapper around the Cairo drawing context |
29 class CairoContext : public boost::noncopyable | 31 class CairoContext : public boost::noncopyable |
30 { | 32 { |
31 private: | 33 private: |
34 class AlphaSurface; | |
35 | |
32 cairo_t* context_; | 36 cairo_t* context_; |
33 unsigned int width_; | 37 unsigned int width_; |
34 unsigned int height_; | 38 unsigned int height_; |
35 | 39 |
36 public: | 40 public: |
59 | 63 |
60 void SetSourceColor(const uint8_t color[3]) | 64 void SetSourceColor(const uint8_t color[3]) |
61 { | 65 { |
62 SetSourceColor(color[0], color[1], color[2]); | 66 SetSourceColor(color[0], color[1], color[2]); |
63 } | 67 } |
68 | |
69 void DrawText(const Orthanc::Font& font, | |
70 const std::string& text, | |
71 double x, | |
72 double y); | |
64 }; | 73 }; |
65 } | 74 } |