diff Framework/Widgets/LayoutWidget.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 8a86695fcbc3
children 8716176ff7f0
line wrap: on
line diff
--- a/Framework/Widgets/LayoutWidget.cpp	Fri Oct 05 11:57:36 2018 +0200
+++ b/Framework/Widgets/LayoutWidget.cpp	Mon Oct 08 17:10:08 2018 +0200
@@ -57,7 +57,8 @@
 
     virtual void Render(Orthanc::ImageAccessor& surface)
     {
-      Orthanc::ImageAccessor accessor = surface.GetRegion(left_, top_, width_, height_);
+      Orthanc::ImageAccessor accessor;
+      surface.GetRegion(accessor, left_, top_, width_, height_);
       tracker_->Render(accessor);
     }
 
@@ -140,7 +141,8 @@
       }
       else 
       {
-        Orthanc::ImageAccessor accessor = target.GetRegion(left_, top_, width_, height_);
+        Orthanc::ImageAccessor accessor;
+        target.GetRegion(accessor, left_, top_, width_, height_);
         return widget_->Render(accessor);
       }
     }
@@ -171,7 +173,8 @@
     {
       if (Contains(x, y))
       {
-        Orthanc::ImageAccessor accessor = target.GetRegion(left_, top_, width_, height_);
+        Orthanc::ImageAccessor accessor;
+        target.GetRegion(accessor, left_, top_, width_, height_);
 
         widget_->RenderMouseOver(accessor, x - left_, y - top_);
       }