Mercurial > hg > orthanc-stone
comparison Framework/Widgets/CairoWidget.cpp @ 561:1201b12eb9f8 dev
merge default -> dev
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Thu, 18 Apr 2019 09:30:00 +0200 |
parents | aaeec7be8fb7 |
children | 4f2416d519b4 |
comparison
equal
deleted
inserted
replaced
558:d5579bdc59b5 | 561:1201b12eb9f8 |
---|---|
38 } | 38 } |
39 | 39 |
40 void CairoWidget::SetSize(unsigned int width, | 40 void CairoWidget::SetSize(unsigned int width, |
41 unsigned int height) | 41 unsigned int height) |
42 { | 42 { |
43 surface_.SetSize(width, height); | 43 surface_.SetSize(width, height, false /* no alpha */); |
44 } | 44 } |
45 | 45 |
46 | 46 |
47 bool CairoWidget::Render(Orthanc::ImageAccessor& target) | 47 bool CairoWidget::Render(Orthanc::ImageAccessor& target) |
48 { | 48 { |
49 // Don't call the base class here, as | 49 // Don't call the base class here, as |
50 // "ClearBackgroundCairo()" is a faster alternative | 50 // "ClearBackgroundCairo()" is a faster alternative |
51 | 51 |
52 if (IsAligned(target)) | 52 if (IsAligned(target)) |
53 { | 53 { |
54 CairoSurface surface(target); | 54 CairoSurface surface(target, false /* no alpha */); |
55 CairoContext context(surface); | 55 CairoContext context(surface); |
56 ClearBackgroundCairo(context); | 56 ClearBackgroundCairo(context); |
57 return RenderCairo(context); | 57 return RenderCairo(context); |
58 } | 58 } |
59 else | 59 else |
80 int x, | 80 int x, |
81 int y) | 81 int y) |
82 { | 82 { |
83 if (IsAligned(target)) | 83 if (IsAligned(target)) |
84 { | 84 { |
85 CairoSurface surface(target); | 85 CairoSurface surface(target, false /* no alpha */); |
86 CairoContext context(surface); | 86 CairoContext context(surface); |
87 RenderMouseOverCairo(context, x, y); | 87 RenderMouseOverCairo(context, x, y); |
88 } | 88 } |
89 else | 89 else |
90 { | 90 { |