Mercurial > hg > orthanc-stone
comparison Framework/Widgets/CairoWidget.cpp @ 316:ce48c3b3b0e9
fix for new ImageAccessor API
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 08 Oct 2018 12:45:27 +0200 |
parents | 5412adf19980 |
children | 557c8ff1db5c |
comparison
equal
deleted
inserted
replaced
310:348e00b837b9 | 316:ce48c3b3b0e9 |
---|---|
57 CairoContext context(surface_); | 57 CairoContext context(surface_); |
58 ClearBackgroundCairo(context); | 58 ClearBackgroundCairo(context); |
59 | 59 |
60 if (RenderCairo(context)) | 60 if (RenderCairo(context)) |
61 { | 61 { |
62 Orthanc::ImageProcessing::Copy(target, surface_.GetAccessor()); | 62 Orthanc::ImageAccessor surface; |
63 surface_.GetReadOnlyAccessor(surface); | |
64 Orthanc::ImageProcessing::Copy(target, surface); | |
63 return true; | 65 return true; |
64 } | 66 } |
65 else | 67 else |
66 { | 68 { |
67 return false; | 69 return false; |
80 CairoContext context(surface); | 82 CairoContext context(surface); |
81 RenderMouseOverCairo(context, x, y); | 83 RenderMouseOverCairo(context, x, y); |
82 } | 84 } |
83 else | 85 else |
84 { | 86 { |
85 Orthanc::ImageAccessor accessor = surface_.GetAccessor(); | 87 Orthanc::ImageAccessor accessor; |
88 surface_.GetWriteableAccessor(accessor); | |
86 Orthanc::ImageProcessing::Copy(accessor, target); | 89 Orthanc::ImageProcessing::Copy(accessor, target); |
87 | 90 |
88 CairoContext context(surface_); | 91 CairoContext context(surface_); |
89 RenderMouseOverCairo(context, x, y); | 92 RenderMouseOverCairo(context, x, y); |
90 | 93 |