drawinglayer/source/processor2d/cairopixelprocessor2d.cxx |   10 ++++++++++
 1 file changed, 10 insertions(+)

New commits:
commit 0957ec405757ad72d2e1fe4ceed4ac486b27aa21
Author:     Armin Le Grand (Collabora) <[email protected]>
AuthorDate: Fri May 23 19:07:18 2025 +0200
Commit:     Armin Le Grand <[email protected]>
CommitDate: Mon May 26 13:36:06 2025 +0200

    CairoSDPR: Correct BackgroundColorPrimitive2D when Viewport set
    
    If the BackgroundColorPrimitive2D has a Viewport set this means
    we have limitations, so render as needed/defined. This can be
    done additionally by creating geometry for that range, or just
    use the decomposition. To do so, just use recursion/decompose
    in this case.
    
    Change-Id: I85fe6eb78fe8d154ced99d53af40ba0d9f1049d8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185718
    Reviewed-by: Armin Le Grand <[email protected]>
    Tested-by: Jenkins

diff --git a/drawinglayer/source/processor2d/cairopixelprocessor2d.cxx 
b/drawinglayer/source/processor2d/cairopixelprocessor2d.cxx
index 63eba355290d..ee127e4b4fca 100644
--- a/drawinglayer/source/processor2d/cairopixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/cairopixelprocessor2d.cxx
@@ -2101,6 +2101,16 @@ void 
CairoPixelProcessor2D::processBackgroundColorPrimitive2D(
         || rBackgroundColorCandidate.getTransparency() >= 1.0)
         return;
 
+    if (!getViewInformation2D().getViewport().isEmpty())
+    {
+        // we have a Viewport set with limitations, render as needed/defined
+        // by BackgroundColorPrimitive2D::create2DDecomposition. Alternatively,
+        // just use recursion/decompose in this case
+        process(rBackgroundColorCandidate);
+        return;
+    }
+
+    // no Viewport set, render surface completely
     cairo_save(mpRT);
     const basegfx::BColor aFillColor(
         
maBColorModifierStack.getModifiedColor(rBackgroundColorCandidate.getBColor()));

Reply via email to