comparison Framework/Viewport/CairoSurface.cpp @ 369:557c8ff1db5c am-2

integration mainline->am-2
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 05 Nov 2018 10:03:14 +0100
parents 3a4ca166fafa ce48c3b3b0e9
children b70e9be013e4
comparison
equal deleted inserted replaced
367:face7b7008de 369:557c8ff1db5c
105 105
106 void CairoSurface::Copy(const CairoSurface& other) 106 void CairoSurface::Copy(const CairoSurface& other)
107 { 107 {
108 Orthanc::ImageAccessor source, target; 108 Orthanc::ImageAccessor source, target;
109 109
110 other.GetConstAccessor(source); 110 other.GetReadOnlyAccessor(source);
111 GetAccessor(target); 111 GetWriteableAccessor(target);
112 112
113 Orthanc::ImageProcessing::Copy(target, source); 113 Orthanc::ImageProcessing::Copy(target, source);
114 } 114 }
115 115
116 116
117 void CairoSurface::GetConstAccessor(Orthanc::ImageAccessor& target) const 117 void CairoSurface::GetReadOnlyAccessor(Orthanc::ImageAccessor& target) const
118 { 118 {
119 target.AssignReadOnly(Orthanc::PixelFormat_BGRA32, width_, height_, pitch_, buffer_); 119 target.AssignReadOnly(Orthanc::PixelFormat_BGRA32, width_, height_, pitch_, buffer_);
120 } 120 }
121
121 122
122 123 void CairoSurface::GetWriteableAccessor(Orthanc::ImageAccessor& target)
123 void CairoSurface::GetAccessor(Orthanc::ImageAccessor& target)
124 { 124 {
125 target.AssignWritable(Orthanc::PixelFormat_BGRA32, width_, height_, pitch_, buffer_); 125 target.AssignWritable(Orthanc::PixelFormat_BGRA32, width_, height_, pitch_, buffer_);
126 } 126 }
127 } 127 }