openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1607810 - in /openoffice/branches/AOO410/main/svgio: ./ inc/svgio/svgreader/svgclippathnode.hxx inc/svgio/svgreader/svgmasknode.hxx source/svgreader/svgclippathnode.cxx source/svgreader/svgmasknode.cxx source/svgreader/svgstyleattributes.cxx
Date Fri, 04 Jul 2014 09:36:51 GMT
Author: alg
Date: Fri Jul  4 09:36:51 2014
New Revision: 1607810

URL: http://svn.apache.org/r1607810
Log:
i124852 Corrected mask and clip polygons for userSpaceOnUse

Modified:
    openoffice/branches/AOO410/main/svgio/   (props changed)
    openoffice/branches/AOO410/main/svgio/inc/svgio/svgreader/svgclippathnode.hxx
    openoffice/branches/AOO410/main/svgio/inc/svgio/svgreader/svgmasknode.hxx
    openoffice/branches/AOO410/main/svgio/source/svgreader/svgclippathnode.cxx
    openoffice/branches/AOO410/main/svgio/source/svgreader/svgmasknode.cxx
    openoffice/branches/AOO410/main/svgio/source/svgreader/svgstyleattributes.cxx

Propchange: openoffice/branches/AOO410/main/svgio/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Fri Jul  4 09:36:51 2014
@@ -0,0 +1,5 @@
+/openoffice/branches/AOO400/main/svgio:1503684
+/openoffice/branches/ia2/main/svgio:1417739-1541842
+/openoffice/branches/ooxml-osba/main/svgio:1546391,1546395,1546574,1546934,1547030,1547392,1551920,1551954,1551958,1552283
+/openoffice/branches/rejuvenate01/main/svgio:1480411,1534063,1534098,1536312,1549902,1560617
+/openoffice/trunk/main/svgio:1571617,1571677,1572569,1572577,1574058,1574101,1575922,1576216,1576748,1578786,1579934,1580657,1580779,1581746,1581840,1582359,1582365,1582709,1583336,1583418,1583589,1583988,1585261,1586242,1586249,1586583,1587468,1589050,1592692,1592716,1594206,1595847,1595851,1595858,1596218,1596491,1596494,1597076,1597102,1597109,1599169,1599173-1599174,1600581,1600587,1600590,1600630,1600861,1600863,1600883,1602434,1602823,1602850,1603416,1603897,1607682

Modified: openoffice/branches/AOO410/main/svgio/inc/svgio/svgreader/svgclippathnode.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/AOO410/main/svgio/inc/svgio/svgreader/svgclippathnode.hxx?rev=1607810&r1=1607809&r2=1607810&view=diff
==============================================================================
--- openoffice/branches/AOO410/main/svgio/inc/svgio/svgreader/svgclippathnode.hxx (original)
+++ openoffice/branches/AOO410/main/svgio/inc/svgio/svgreader/svgclippathnode.hxx Fri Jul
 4 09:36:51 2014
@@ -52,8 +52,10 @@ namespace svgio
             virtual void parseAttribute(const rtl::OUString& rTokenName, SVGToken aSVGToken,
const rtl::OUString& aContent);
             virtual void decomposeSvgNode(drawinglayer::primitive2d::Primitive2DSequence&
rTarget, bool bReferenced) const;
 
-            /// apply contained clipPath to given geometry
-            void apply(drawinglayer::primitive2d::Primitive2DSequence& rTarget) const;
+            /// apply contained clipPath to given geometry #i124852# transform may be needed
+            void apply(
+                drawinglayer::primitive2d::Primitive2DSequence& rTarget, 
+                const basegfx::B2DHomMatrix* pTransform) const;
 
             /// clipPathUnits content
             SvgUnits getClipPathUnits() const { return maClipPathUnits; }

Modified: openoffice/branches/AOO410/main/svgio/inc/svgio/svgreader/svgmasknode.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/AOO410/main/svgio/inc/svgio/svgreader/svgmasknode.hxx?rev=1607810&r1=1607809&r2=1607810&view=diff
==============================================================================
--- openoffice/branches/AOO410/main/svgio/inc/svgio/svgreader/svgmasknode.hxx (original)
+++ openoffice/branches/AOO410/main/svgio/inc/svgio/svgreader/svgmasknode.hxx Fri Jul  4 09:36:51
2014
@@ -57,8 +57,10 @@ namespace svgio
             virtual void parseAttribute(const rtl::OUString& rTokenName, SVGToken aSVGToken,
const rtl::OUString& aContent);
             virtual void decomposeSvgNode(drawinglayer::primitive2d::Primitive2DSequence&
rTarget, bool bReferenced) const;
 
-            /// apply contained clipPath to given geometry
-            void apply(drawinglayer::primitive2d::Primitive2DSequence& rTarget) const;
+            /// apply contained clipPath to given geometry #i124852# transform may be needed
+            void apply(
+                drawinglayer::primitive2d::Primitive2DSequence& rTarget, 
+                const basegfx::B2DHomMatrix* pTransform) const;
 
             /// x content, set if found in current context
             const SvgNumber& getX() const { return maX; }

Modified: openoffice/branches/AOO410/main/svgio/source/svgreader/svgclippathnode.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/AOO410/main/svgio/source/svgreader/svgclippathnode.cxx?rev=1607810&r1=1607809&r2=1607810&view=diff
==============================================================================
--- openoffice/branches/AOO410/main/svgio/source/svgreader/svgclippathnode.cxx (original)
+++ openoffice/branches/AOO410/main/svgio/source/svgreader/svgclippathnode.cxx Fri Jul  4
09:36:51 2014
@@ -131,7 +131,9 @@ namespace svgio
             }
         }
 
-        void SvgClipPathNode::apply(drawinglayer::primitive2d::Primitive2DSequence& rContent)
const
+        void SvgClipPathNode::apply(
+            drawinglayer::primitive2d::Primitive2DSequence& rContent,
+            const basegfx::B2DHomMatrix* pTransform) const
         {
             if(rContent.hasElements() && Display_none != getDisplay())
             {
@@ -178,6 +180,14 @@ namespace svgio
                                 aContentRange.getRange(),
                                 aContentRange.getMinimum()));
                     }
+                    else // userSpaceOnUse
+                    {
+                        // #i124852#
+                        if(pTransform)
+                        {
+                            aClipPolyPolygon.transform(*pTransform);
+                        }
+                    }
 
                     // redefine target. Use MaskPrimitive2D with created clip
                     // geometry. Using the automatically set mbIsClipPathContent at 

Modified: openoffice/branches/AOO410/main/svgio/source/svgreader/svgmasknode.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/AOO410/main/svgio/source/svgreader/svgmasknode.cxx?rev=1607810&r1=1607809&r2=1607810&view=diff
==============================================================================
--- openoffice/branches/AOO410/main/svgio/source/svgreader/svgmasknode.cxx (original)
+++ openoffice/branches/AOO410/main/svgio/source/svgreader/svgmasknode.cxx Fri Jul  4 09:36:51
2014
@@ -197,7 +197,9 @@ namespace svgio
             }
         }
 
-        void SvgMaskNode::apply(drawinglayer::primitive2d::Primitive2DSequence& rTarget)
const
+        void SvgMaskNode::apply(
+            drawinglayer::primitive2d::Primitive2DSequence& rTarget,
+            const basegfx::B2DHomMatrix* pTransform) const
         {
             if(rTarget.hasElements() && Display_none != getDisplay())
             {
@@ -259,6 +261,19 @@ namespace svgio
 
                             aMaskTarget = drawinglayer::primitive2d::Primitive2DSequence(&xTransform,
1);
                         }
+                        else // userSpaceOnUse
+                        {
+                            // #i124852#
+                            if(pTransform)
+                            {
+                                const drawinglayer::primitive2d::Primitive2DReference xTransform(
+                                    new drawinglayer::primitive2d::TransformPrimitive2D(
+                                        *pTransform,
+                                        aMaskTarget));
+
+                                aMaskTarget = drawinglayer::primitive2d::Primitive2DSequence(&xTransform,
1);
+                            }
+                        }
 
                         // embed content to a ModifiedColorPrimitive2D since the definitions
                         // how content is used as alpha is special for Svg

Modified: openoffice/branches/AOO410/main/svgio/source/svgreader/svgstyleattributes.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/AOO410/main/svgio/source/svgreader/svgstyleattributes.cxx?rev=1607810&r1=1607809&r2=1607810&view=diff
==============================================================================
--- openoffice/branches/AOO410/main/svgio/source/svgreader/svgstyleattributes.cxx (original)
+++ openoffice/branches/AOO410/main/svgio/source/svgreader/svgstyleattributes.cxx Fri Jul
 4 09:36:51 2014
@@ -1130,7 +1130,8 @@ namespace svgio
 
                     if(mpClip)
                     {
-                        mpClip->apply(aSource);
+                        // #i124852# transform may be needed when userSpaceOnUse
+                        mpClip->apply(aSource, pTransform);
                     }
                 }
 
@@ -1143,7 +1144,8 @@ namespace svgio
 
                         if(mpMask)
                         {
-                            mpMask->apply(aSource);
+                            // #i124852# transform may be needed when userSpaceOnUse
+                            mpMask->apply(aSource, pTransform);
                         }
                     }
 



Mime
View raw message