diff Framework/Scene2D/Internals/CairoColorTextureRenderer.cpp @ 768:55411e7da2f7

LookupTableTextureSceneLayer
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 23 May 2019 20:04:33 +0200
parents 9e51fb773bbd
children 2d8ab34c8c91
line wrap: on
line diff
--- a/Framework/Scene2D/Internals/CairoColorTextureRenderer.cpp	Thu May 23 16:57:33 2019 +0200
+++ b/Framework/Scene2D/Internals/CairoColorTextureRenderer.cpp	Thu May 23 20:04:33 2019 +0200
@@ -44,13 +44,17 @@
       isLinearInterpolation_ = l.IsLinearInterpolation();
     }
 
-    
-    void CairoColorTextureRenderer::Render(const AffineTransform2D& transform)
+
+    void CairoColorTextureRenderer::RenderColorTexture(ICairoContextProvider& target,
+                                                       const AffineTransform2D& transform,
+                                                       CairoSurface& texture,
+                                                       const AffineTransform2D& textureTransform,
+                                                       bool isLinearInterpolation)
     {
-      cairo_t* cr = target_.GetCairoContext();
+      cairo_t* cr = target.GetCairoContext();
 
       AffineTransform2D t =
-        AffineTransform2D::Combine(transform, textureTransform_);
+        AffineTransform2D::Combine(transform, textureTransform);
       Matrix h = t.GetHomogeneousMatrix();
       
       cairo_save(cr);
@@ -60,9 +64,9 @@
       cairo_transform(cr, &m);
 
       cairo_set_operator(cr, CAIRO_OPERATOR_OVER);
-      cairo_set_source_surface(cr, texture_.GetObject(), 0, 0);
+      cairo_set_source_surface(cr, texture.GetObject(), 0, 0);
 
-      if (isLinearInterpolation_)
+      if (isLinearInterpolation)
       {
         cairo_pattern_set_filter(cairo_get_source(cr), CAIRO_FILTER_BILINEAR);
       }