Mercurial > hg > orthanc-stone
comparison Framework/Widgets/CairoWidget.cpp @ 318:3a4ca166fafa am-2
ImageAccessor refactoring + implemented Image Cache in SmartLoader
author | am@osimis.io |
---|---|
date | Mon, 08 Oct 2018 17:10:08 +0200 |
parents | f21ba2468570 |
children | ef31240a73f6 |
comparison
equal
deleted
inserted
replaced
317:b66d13708f40 | 318:3a4ca166fafa |
---|---|
61 CairoContext context(surface_); | 61 CairoContext context(surface_); |
62 ClearBackgroundCairo(context); | 62 ClearBackgroundCairo(context); |
63 | 63 |
64 if (RenderCairo(context)) | 64 if (RenderCairo(context)) |
65 { | 65 { |
66 Orthanc::ImageProcessing::Copy(target, surface_.GetAccessor()); | 66 Orthanc::ImageAccessor source; |
67 surface_.GetAccessor(source); | |
68 Orthanc::ImageProcessing::Copy(target, source); | |
67 return true; | 69 return true; |
68 } | 70 } |
69 else | 71 else |
70 { | 72 { |
71 return false; | 73 return false; |
84 CairoContext context(surface); | 86 CairoContext context(surface); |
85 RenderMouseOverCairo(context, x, y); | 87 RenderMouseOverCairo(context, x, y); |
86 } | 88 } |
87 else | 89 else |
88 { | 90 { |
89 Orthanc::ImageAccessor accessor = surface_.GetAccessor(); | 91 Orthanc::ImageAccessor accessor; |
92 surface_.GetAccessor(accessor); | |
90 Orthanc::ImageProcessing::Copy(accessor, target); | 93 Orthanc::ImageProcessing::Copy(accessor, target); |
91 | 94 |
92 CairoContext context(surface_); | 95 CairoContext context(surface_); |
93 RenderMouseOverCairo(context, x, y); | 96 RenderMouseOverCairo(context, x, y); |
94 | 97 |