You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by al...@apache.org on 2012/10/16 11:44:04 UTC

svn commit: r1398711 [1/4] - in /incubator/ooo/trunk/main: drawinglayer/ drawinglayer/inc/drawinglayer/attribute/ drawinglayer/inc/drawinglayer/primitive2d/ drawinglayer/inc/drawinglayer/primitive3d/ drawinglayer/inc/drawinglayer/processor2d/ drawingla...

Author: alg
Date: Tue Oct 16 09:44:02 2012
New Revision: 1398711

URL: http://svn.apache.org/viewvc?rev=1398711&view=rev
Log:
#121194# Better support for graphic fill styles which are not bitmaps (svg, metafiles, ..)

Added:
    incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/attribute/fillgraphicattribute.hxx   (with props)
    incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/attribute/sdrfillgraphicattribute.hxx   (with props)
    incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/primitive2d/fillgraphicprimitive2d.hxx   (with props)
    incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/primitive2d/graphicprimitivehelper2d.hxx   (with props)
    incubator/ooo/trunk/main/drawinglayer/source/attribute/fillgraphicattribute.cxx   (with props)
    incubator/ooo/trunk/main/drawinglayer/source/attribute/sdrfillgraphicattribute.cxx   (with props)
    incubator/ooo/trunk/main/drawinglayer/source/primitive2d/fillgraphicprimitive2d.cxx
    incubator/ooo/trunk/main/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx   (with props)
    incubator/ooo/trunk/main/drawinglayer/source/processor2d/_vclmetafileprocessor2d.cxx
Removed:
    incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/attribute/fillbitmapattribute.hxx
    incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/attribute/sdrfillbitmapattribute.hxx
    incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/primitive2d/fillbitmapprimitive2d.hxx
    incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/processor2d/canvasprocessor.hxx
    incubator/ooo/trunk/main/drawinglayer/source/attribute/fillbitmapattribute.cxx
    incubator/ooo/trunk/main/drawinglayer/source/attribute/sdrfillbitmapattribute.cxx
    incubator/ooo/trunk/main/drawinglayer/source/primitive2d/fillbitmapprimitive2d.cxx
    incubator/ooo/trunk/main/drawinglayer/source/processor2d/canvasprocessor.cxx
Modified:
    incubator/ooo/trunk/main/drawinglayer/Library_drawinglayer.mk
    incubator/ooo/trunk/main/drawinglayer/Package_inc.mk
    incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/attribute/sdrfillattribute.hxx
    incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx
    incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx
    incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx
    incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx
    incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/texture/texture.hxx
    incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/texture/texture3d.hxx
    incubator/ooo/trunk/main/drawinglayer/source/attribute/sdrfillattribute.cxx
    incubator/ooo/trunk/main/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
    incubator/ooo/trunk/main/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
    incubator/ooo/trunk/main/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx
    incubator/ooo/trunk/main/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx
    incubator/ooo/trunk/main/drawinglayer/source/primitive2d/wallpaperprimitive2d.cxx
    incubator/ooo/trunk/main/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx
    incubator/ooo/trunk/main/drawinglayer/source/primitive3d/textureprimitive3d.cxx
    incubator/ooo/trunk/main/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
    incubator/ooo/trunk/main/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
    incubator/ooo/trunk/main/drawinglayer/source/processor2d/vclprocessor2d.cxx
    incubator/ooo/trunk/main/drawinglayer/source/processor3d/defaultprocessor3d.cxx
    incubator/ooo/trunk/main/drawinglayer/source/texture/texture.cxx
    incubator/ooo/trunk/main/drawinglayer/source/texture/texture3d.cxx
    incubator/ooo/trunk/main/svx/inc/svx/sdr/primitive2d/sdrattributecreator.hxx
    incubator/ooo/trunk/main/svx/source/sdr/contact/objectcontacttools.cxx
    incubator/ooo/trunk/main/svx/source/sdr/contact/viewobjectcontact.cxx
    incubator/ooo/trunk/main/svx/source/sdr/primitive2d/sdrattributecreator.cxx
    incubator/ooo/trunk/main/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
    incubator/ooo/trunk/main/svx/source/xoutdev/xattrbmp.cxx
    incubator/ooo/trunk/main/vcl/inc/vcl/graph.hxx
    incubator/ooo/trunk/main/vcl/source/gdi/impgraph.cxx

Modified: incubator/ooo/trunk/main/drawinglayer/Library_drawinglayer.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/drawinglayer/Library_drawinglayer.mk?rev=1398711&r1=1398710&r2=1398711&view=diff
==============================================================================
--- incubator/ooo/trunk/main/drawinglayer/Library_drawinglayer.mk (original)
+++ incubator/ooo/trunk/main/drawinglayer/Library_drawinglayer.mk Tue Oct 16 09:44:02 2012
@@ -66,7 +66,7 @@ $(eval $(call gb_Library_add_exception_o
 	drawinglayer/source/animation/animationtiming \
 	drawinglayer/source/attribute/fillgradientattribute \
 	drawinglayer/source/attribute/fillhatchattribute \
-	drawinglayer/source/attribute/fillbitmapattribute \
+	drawinglayer/source/attribute/fillgraphicattribute \
 	drawinglayer/source/attribute/fontattribute \
 	drawinglayer/source/attribute/materialattribute3d \
 	drawinglayer/source/attribute/sdrallattribute3d \
@@ -78,7 +78,7 @@ $(eval $(call gb_Library_add_exception_o
 	drawinglayer/source/attribute/sdrlightattribute3d \
 	drawinglayer/source/attribute/sdrlightingattribute3d \
 	drawinglayer/source/attribute/sdrsceneattribute3d \
-	drawinglayer/source/attribute/sdrfillbitmapattribute \
+	drawinglayer/source/attribute/sdrfillgraphicattribute \
 	drawinglayer/source/attribute/lineattribute \
 	drawinglayer/source/attribute/linestartendattribute \
 	drawinglayer/source/attribute/strokeattribute \
@@ -96,9 +96,10 @@ $(eval $(call gb_Library_add_exception_o
 	drawinglayer/source/primitive2d/discreteshadowprimitive2d \
 	drawinglayer/source/primitive2d/embedded3dprimitive2d \
 	drawinglayer/source/primitive2d/epsprimitive2d \
-	drawinglayer/source/primitive2d/fillbitmapprimitive2d \
+	drawinglayer/source/primitive2d/fillgraphicprimitive2d \
 	drawinglayer/source/primitive2d/fillgradientprimitive2d \
 	drawinglayer/source/primitive2d/fillhatchprimitive2d \
+	drawinglayer/source/primitive2d/graphicprimitivehelper2d \
 	drawinglayer/source/primitive2d/graphicprimitive2d \
 	drawinglayer/source/primitive2d/gridprimitive2d \
 	drawinglayer/source/primitive2d/groupprimitive2d \
@@ -165,7 +166,6 @@ $(eval $(call gb_Library_add_exception_o
 	drawinglayer/source/processor2d/vclmetafileprocessor2d \
 	drawinglayer/source/processor2d/contourextractor2d \
 	drawinglayer/source/processor2d/linegeometryextractor2d \
-	drawinglayer/source/processor2d/canvasprocessor \
 	drawinglayer/source/processor2d/hittestprocessor2d \
 	drawinglayer/source/processor2d/textaspolygonextractor2d \
 	drawinglayer/source/processor2d/objectinfoextractor2d \

Modified: incubator/ooo/trunk/main/drawinglayer/Package_inc.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/drawinglayer/Package_inc.mk?rev=1398711&r1=1398710&r2=1398711&view=diff
==============================================================================
--- incubator/ooo/trunk/main/drawinglayer/Package_inc.mk (original)
+++ incubator/ooo/trunk/main/drawinglayer/Package_inc.mk Tue Oct 16 09:44:02 2012
@@ -35,10 +35,11 @@ $(eval $(call gb_Package_add_file,drawin
 $(eval $(call gb_Package_add_file,drawinglayer_inc,inc/drawinglayer/primitive2d/discretebitmapprimitive2d.hxx,drawinglayer/primitive2d/discretebitmapprimitive2d.hxx))
 $(eval $(call gb_Package_add_file,drawinglayer_inc,inc/drawinglayer/primitive2d/discreteshadowprimitive2d.hxx,drawinglayer/primitive2d/discreteshadowprimitive2d.hxx))
 $(eval $(call gb_Package_add_file,drawinglayer_inc,inc/drawinglayer/primitive2d/embedded3dprimitive2d.hxx,drawinglayer/primitive2d/embedded3dprimitive2d.hxx))
-$(eval $(call gb_Package_add_file,drawinglayer_inc,inc/drawinglayer/primitive2d/fillbitmapprimitive2d.hxx,drawinglayer/primitive2d/fillbitmapprimitive2d.hxx))
+$(eval $(call gb_Package_add_file,drawinglayer_inc,inc/drawinglayer/primitive2d/fillgraphicprimitive2d.hxx,drawinglayer/primitive2d/fillgraphicprimitive2d.hxx))
 $(eval $(call gb_Package_add_file,drawinglayer_inc,inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx,drawinglayer/primitive2d/fillgradientprimitive2d.hxx))
 $(eval $(call gb_Package_add_file,drawinglayer_inc,inc/drawinglayer/primitive2d/fillhatchprimitive2d.hxx,drawinglayer/primitive2d/fillhatchprimitive2d.hxx))
 $(eval $(call gb_Package_add_file,drawinglayer_inc,inc/drawinglayer/primitive2d/graphicprimitive2d.hxx,drawinglayer/primitive2d/graphicprimitive2d.hxx))
+$(eval $(call gb_Package_add_file,drawinglayer_inc,inc/drawinglayer/primitive2d/graphicprimitivehelper2d.hxx,drawinglayer/primitive2d/graphicprimitivehelper2d.hxx))
 $(eval $(call gb_Package_add_file,drawinglayer_inc,inc/drawinglayer/primitive2d/gridprimitive2d.hxx,drawinglayer/primitive2d/gridprimitive2d.hxx))
 $(eval $(call gb_Package_add_file,drawinglayer_inc,inc/drawinglayer/primitive2d/groupprimitive2d.hxx,drawinglayer/primitive2d/groupprimitive2d.hxx))
 $(eval $(call gb_Package_add_file,drawinglayer_inc,inc/drawinglayer/primitive2d/helplineprimitive2d.hxx,drawinglayer/primitive2d/helplineprimitive2d.hxx))
@@ -104,7 +105,6 @@ $(eval $(call gb_Package_add_file,drawin
 $(eval $(call gb_Package_add_file,drawinglayer_inc,inc/drawinglayer/processor2d/vclprocessor2d.hxx,drawinglayer/processor2d/vclprocessor2d.hxx))
 $(eval $(call gb_Package_add_file,drawinglayer_inc,inc/drawinglayer/processor2d/vclpixelprocessor2d.hxx,drawinglayer/processor2d/vclpixelprocessor2d.hxx))
 $(eval $(call gb_Package_add_file,drawinglayer_inc,inc/drawinglayer/processor2d/vclmetafileprocessor2d.hxx,drawinglayer/processor2d/vclmetafileprocessor2d.hxx))
-$(eval $(call gb_Package_add_file,drawinglayer_inc,inc/drawinglayer/processor2d/canvasprocessor.hxx,drawinglayer/processor2d/canvasprocessor.hxx))
 $(eval $(call gb_Package_add_file,drawinglayer_inc,inc/drawinglayer/processor2d/contourextractor2d.hxx,drawinglayer/processor2d/contourextractor2d.hxx))
 $(eval $(call gb_Package_add_file,drawinglayer_inc,inc/drawinglayer/processor2d/linegeometryextractor2d.hxx,drawinglayer/processor2d/linegeometryextractor2d.hxx))
 $(eval $(call gb_Package_add_file,drawinglayer_inc,inc/drawinglayer/processor2d/hittestprocessor2d.hxx,drawinglayer/processor2d/hittestprocessor2d.hxx))
@@ -120,7 +120,7 @@ $(eval $(call gb_Package_add_file,drawin
 
 $(eval $(call gb_Package_add_file,drawinglayer_inc,inc/drawinglayer/attribute/fillgradientattribute.hxx,drawinglayer/attribute/fillgradientattribute.hxx))
 $(eval $(call gb_Package_add_file,drawinglayer_inc,inc/drawinglayer/attribute/fillhatchattribute.hxx,drawinglayer/attribute/fillhatchattribute.hxx))
-$(eval $(call gb_Package_add_file,drawinglayer_inc,inc/drawinglayer/attribute/fillbitmapattribute.hxx,drawinglayer/attribute/fillbitmapattribute.hxx))
+$(eval $(call gb_Package_add_file,drawinglayer_inc,inc/drawinglayer/attribute/fillgraphicattribute.hxx,drawinglayer/attribute/fillgraphicattribute.hxx))
 $(eval $(call gb_Package_add_file,drawinglayer_inc,inc/drawinglayer/attribute/fontattribute.hxx,drawinglayer/attribute/fontattribute.hxx))
 $(eval $(call gb_Package_add_file,drawinglayer_inc,inc/drawinglayer/attribute/materialattribute3d.hxx,drawinglayer/attribute/materialattribute3d.hxx))
 $(eval $(call gb_Package_add_file,drawinglayer_inc,inc/drawinglayer/attribute/sdrallattribute3d.hxx,drawinglayer/attribute/sdrallattribute3d.hxx))
@@ -132,7 +132,7 @@ $(eval $(call gb_Package_add_file,drawin
 $(eval $(call gb_Package_add_file,drawinglayer_inc,inc/drawinglayer/attribute/sdrlightattribute3d.hxx,drawinglayer/attribute/sdrlightattribute3d.hxx))
 $(eval $(call gb_Package_add_file,drawinglayer_inc,inc/drawinglayer/attribute/sdrlightingattribute3d.hxx,drawinglayer/attribute/sdrlightingattribute3d.hxx))
 $(eval $(call gb_Package_add_file,drawinglayer_inc,inc/drawinglayer/attribute/sdrsceneattribute3d.hxx,drawinglayer/attribute/sdrsceneattribute3d.hxx))
-$(eval $(call gb_Package_add_file,drawinglayer_inc,inc/drawinglayer/attribute/sdrfillbitmapattribute.hxx,drawinglayer/attribute/sdrfillbitmapattribute.hxx))
+$(eval $(call gb_Package_add_file,drawinglayer_inc,inc/drawinglayer/attribute/sdrfillgraphicattribute.hxx,drawinglayer/attribute/sdrfillgraphicattribute.hxx))
 $(eval $(call gb_Package_add_file,drawinglayer_inc,inc/drawinglayer/attribute/strokeattribute.hxx,drawinglayer/attribute/strokeattribute.hxx))
 $(eval $(call gb_Package_add_file,drawinglayer_inc,inc/drawinglayer/attribute/lineattribute.hxx,drawinglayer/attribute/lineattribute.hxx))
 $(eval $(call gb_Package_add_file,drawinglayer_inc,inc/drawinglayer/attribute/linestartendattribute.hxx,drawinglayer/attribute/linestartendattribute.hxx))

Added: incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/attribute/fillgraphicattribute.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/attribute/fillgraphicattribute.hxx?rev=1398711&view=auto
==============================================================================
--- incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/attribute/fillgraphicattribute.hxx (added)
+++ incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/attribute/fillgraphicattribute.hxx Tue Oct 16 09:44:02 2012
@@ -0,0 +1,85 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+
+
+#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_FILLGRAPHICATTRIBUTE_HXX
+#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_FILLGRAPHICATTRIBUTE_HXX
+
+#include <drawinglayer/drawinglayerdllapi.h>
+//////////////////////////////////////////////////////////////////////////////
+// predefines
+
+class Graphic;
+
+namespace basegfx {
+    class B2DRange;
+}
+
+namespace drawinglayer { namespace attribute {
+	class ImpFillGraphicAttribute;
+}}
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+	namespace attribute
+	{
+		class DRAWINGLAYER_DLLPUBLIC FillGraphicAttribute
+		{
+        private:
+            ImpFillGraphicAttribute*        mpFillGraphicAttribute;
+
+		public:
+            /// constructors/assignmentoperator/destructor
+			FillGraphicAttribute(
+                const Graphic& rGraphic, 
+                const basegfx::B2DRange& rGraphicRange, 
+                bool bTiling = false,
+                double fOffsetX = 0.0,
+                double fOffsetY = 0.0);
+			FillGraphicAttribute();
+			FillGraphicAttribute(const FillGraphicAttribute& rCandidate);
+			FillGraphicAttribute& operator=(const FillGraphicAttribute& rCandidate);
+			~FillGraphicAttribute();
+
+            // checks if the incarnation is default constructed
+            bool isDefault() const;
+
+            // compare operator
+			bool operator==(const FillGraphicAttribute& rCandidate) const;
+
+            // data read access
+			const Graphic& getGraphic() const;
+			const basegfx::B2DRange& getGraphicRange() const;
+			bool getTiling() const;
+            double getOffsetX() const;
+            double getOffsetY() const;
+		};
+	} // end of namespace attribute
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //INCLUDED_DRAWINGLAYER_ATTRIBUTE_FILLGRAPHICATTRIBUTE_HXX
+
+// eof

Propchange: incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/attribute/fillgraphicattribute.hxx
------------------------------------------------------------------------------
    svn:executable = *

Modified: incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/attribute/sdrfillattribute.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/attribute/sdrfillattribute.hxx?rev=1398711&r1=1398710&r2=1398711&view=diff
==============================================================================
--- incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/attribute/sdrfillattribute.hxx (original)
+++ incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/attribute/sdrfillattribute.hxx Tue Oct 16 09:44:02 2012
@@ -34,7 +34,7 @@ namespace drawinglayer { namespace attri
 	class ImpSdrFillAttribute;
 	class FillGradientAttribute;
 	class FillHatchAttribute;
-	class SdrFillBitmapAttribute;
+	class SdrFillGraphicAttribute;
 }}
 
 //////////////////////////////////////////////////////////////////////////////
@@ -55,7 +55,7 @@ namespace drawinglayer
                 const basegfx::BColor& rColor, 
                 const FillGradientAttribute& rGradient, 
 				const FillHatchAttribute& rHatch, 
-                const SdrFillBitmapAttribute& rBitmap);
+                const SdrFillGraphicAttribute& rFillGraphic);
 			SdrFillAttribute();
 			SdrFillAttribute(const SdrFillAttribute& rCandidate);
 			SdrFillAttribute& operator=(const SdrFillAttribute& rCandidate);
@@ -72,7 +72,7 @@ namespace drawinglayer
 			const basegfx::BColor& getColor() const;
 			const FillGradientAttribute& getGradient() const;
 			const FillHatchAttribute& getHatch() const;
-			const SdrFillBitmapAttribute& getBitmap() const;
+			const SdrFillGraphicAttribute& getFillGraphic() const;
 		};
 	} // end of namespace attribute
 } // end of namespace drawinglayer

Added: incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/attribute/sdrfillgraphicattribute.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/attribute/sdrfillgraphicattribute.hxx?rev=1398711&view=auto
==============================================================================
--- incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/attribute/sdrfillgraphicattribute.hxx (added)
+++ incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/attribute/sdrfillgraphicattribute.hxx Tue Oct 16 09:44:02 2012
@@ -0,0 +1,97 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+
+
+#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRFILLGRAPHICATTRIBUTE_HXX
+#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRFILLGRAPHICATTRIBUTE_HXX
+
+#include <drawinglayer/drawinglayerdllapi.h>
+
+//////////////////////////////////////////////////////////////////////////////
+// predefines
+
+class Graphic;
+
+namespace basegfx {
+	class B2DRange;
+    class B2DVector;
+}
+
+namespace drawinglayer { namespace attribute {
+	class FillGraphicAttribute;
+    class ImpSdrFillGraphicAttribute;
+}}
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+	namespace attribute
+	{
+		class DRAWINGLAYER_DLLPUBLIC SdrFillGraphicAttribute
+		{
+        private:
+            ImpSdrFillGraphicAttribute*     mpSdrFillGraphicAttribute;
+
+		public:
+            /// constructors/assignmentoperator/destructor
+			SdrFillGraphicAttribute(
+				const Graphic& rFillGraphic, 
+                const basegfx::B2DVector& rSize, 
+                const basegfx::B2DVector& rOffset,
+				const basegfx::B2DVector& rOffsetPosition, 
+                const basegfx::B2DVector& rRectPoint,
+				bool bTiling, 
+                bool bStretch, 
+                bool bLogSize);
+			SdrFillGraphicAttribute();
+			SdrFillGraphicAttribute(const SdrFillGraphicAttribute& rCandidate);
+			SdrFillGraphicAttribute& operator=(const SdrFillGraphicAttribute& rCandidate);
+			~SdrFillGraphicAttribute();
+
+            // checks if the incarnation is default constructed
+            bool isDefault() const;
+
+            // compare operator
+			bool operator==(const SdrFillGraphicAttribute& rCandidate) const;
+
+			// data read access
+            const Graphic& getFillGraphic() const;
+            const basegfx::B2DVector& getSize() const;
+            const basegfx::B2DVector& getOffset() const;
+            const basegfx::B2DVector& getOffsetPosition() const;
+            const basegfx::B2DVector& getRectPoint() const;
+            bool getTiling() const;
+            bool getStretch() const;
+            bool getLogSize() const;
+
+            // FillGraphicAttribute generator
+			FillGraphicAttribute createFillGraphicAttribute(const basegfx::B2DRange& rRange) const;
+		};
+	} // end of namespace attribute
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRFILLGRAPHICATTRIBUTE_HXX
+
+// eof

Propchange: incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/attribute/sdrfillgraphicattribute.hxx
------------------------------------------------------------------------------
    svn:executable = *

Modified: incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx?rev=1398711&r1=1398710&r2=1398711&view=diff
==============================================================================
--- incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx (original)
+++ incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx Tue Oct 16 09:44:02 2012
@@ -44,7 +44,7 @@
 #define PRIMITIVE2D_ID_BITMAPPRIMITIVE2D					(PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 5)
 #define PRIMITIVE2D_ID_CONTROLPRIMITIVE2D					(PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 6)
 #define PRIMITIVE2D_ID_EMBEDDED3DPRIMITIVE2D				(PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 7)
-#define PRIMITIVE2D_ID_FILLBITMAPPRIMITIVE2D				(PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 8)
+#define PRIMITIVE2D_ID_FILLGRAPHICPRIMITIVE2D				(PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 8)
 #define PRIMITIVE2D_ID_FILLGRADIENTPRIMITIVE2D				(PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 9)
 #define PRIMITIVE2D_ID_FILLHATCHPRIMITIVE2D					(PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 10)
 #define PRIMITIVE2D_ID_GRAPHICPRIMITIVE2D					(PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 11)
@@ -65,7 +65,7 @@
 #define PRIMITIVE2D_ID_POLYPOLYGONCOLORPRIMITIVE2D			(PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 26)
 #define PRIMITIVE2D_ID_POLYPOLYGONGRADIENTPRIMITIVE2D		(PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 27)
 #define PRIMITIVE2D_ID_POLYPOLYGONHATCHPRIMITIVE2D			(PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 28)
-#define PRIMITIVE2D_ID_POLYPOLYGONBITMAPPRIMITIVE2D			(PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 29)
+#define PRIMITIVE2D_ID_POLYPOLYGONGRAPHICPRIMITIVE2D		(PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 29)
 #define PRIMITIVE2D_ID_SCENEPRIMITIVE2D						(PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 30)
 #define PRIMITIVE2D_ID_SHADOWPRIMITIVE2D					(PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 31)
 #define PRIMITIVE2D_ID_TEXTSIMPLEPORTIONPRIMITIVE2D			(PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 32)

Added: incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/primitive2d/fillgraphicprimitive2d.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/primitive2d/fillgraphicprimitive2d.hxx?rev=1398711&view=auto
==============================================================================
--- incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/primitive2d/fillgraphicprimitive2d.hxx (added)
+++ incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/primitive2d/fillgraphicprimitive2d.hxx Tue Oct 16 09:44:02 2012
@@ -0,0 +1,92 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+
+
+#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_FILLGRAPHICPRIMITIVE2D_HXX
+#define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_FILLGRAPHICPRIMITIVE2D_HXX
+
+#include <drawinglayer/drawinglayerdllapi.h>
+#include <drawinglayer/primitive2d/baseprimitive2d.hxx>
+#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <drawinglayer/attribute/fillgraphicattribute.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// FillbitmapPrimitive2D class
+
+namespace drawinglayer
+{
+	namespace primitive2d
+	{
+        /** FillGraphicPrimitive2D class
+
+            This class defines a bitmap filling for a rectangular area. The
+            Range is defined by the Transformation, the fill by the FillGraphicAttribute.
+            There, the fill consists of a Bitmap (not transparent) defining the fill data
+            and a Point/Vector pair defining the relative position/size [0.0 .. 1.0]
+            inside the area where the bitmap is positioned. A flag defines then if this
+            is tiled or not.
+
+            Renderers should handle this primitive; it has a geometrically correct
+            decomposition, but on pixel oututs the areas where the tiled pieces are
+            aligned tend to show up (one overlapping or empty pixel)
+         */
+		class DRAWINGLAYER_DLLPUBLIC FillGraphicPrimitive2D : public BufferedDecompositionPrimitive2D
+		{
+		private:
+            /// the geometric definition
+			basegfx::B2DHomMatrix						maTransformation;
+
+            /// the fill attributes
+			attribute::FillGraphicAttribute				maFillGraphic;
+
+		protected:
+			/// local decomposition.
+			virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
+
+		public:
+            /// constructor
+			FillGraphicPrimitive2D(
+				const basegfx::B2DHomMatrix& rTransformation, 
+				const attribute::FillGraphicAttribute& rFillGraphic);
+
+			/// data read access
+			const basegfx::B2DHomMatrix& getTransformation() const { return maTransformation; }
+			const attribute::FillGraphicAttribute& getFillGraphic() const { return maFillGraphic; }
+
+			/// compare operator
+			virtual bool operator==( const BasePrimitive2D& rPrimitive ) const;
+
+			/// get range
+			virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
+
+			/// provide unique ID
+			DeclPrimitrive2DIDBlock()
+		};
+	} // end of namespace primitive2d
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //INCLUDED_DRAWINGLAYER_PRIMITIVE2D_FILLGRAPHICPRIMITIVE2D_HXX
+
+//////////////////////////////////////////////////////////////////////////////
+// eof

Propchange: incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/primitive2d/fillgraphicprimitive2d.hxx
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/primitive2d/graphicprimitivehelper2d.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/primitive2d/graphicprimitivehelper2d.hxx?rev=1398711&view=auto
==============================================================================
--- incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/primitive2d/graphicprimitivehelper2d.hxx (added)
+++ incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/primitive2d/graphicprimitivehelper2d.hxx Tue Oct 16 09:44:02 2012
@@ -0,0 +1,60 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+
+
+#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_GRAPHICPRIMITIVEHELPER2D_HXX
+#define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_GRAPHICPRIMITIVEHELPER2D_HXX
+
+#include <drawinglayer/drawinglayerdllapi.h>
+#include <drawinglayer/primitive2d/baseprimitive2d.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predefines
+
+class Graphic;
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+	namespace primitive2d
+	{
+        /** Helper method with supports decomposing a Graphic with all
+            possible contents to lower level primitives.
+
+            #121194# Unified to use this helper for FillGraphicPrimitive2D
+            and GraphicPrimitive2D at the same time. It is able to handle
+            Bitmaps (with the sub-categories animated bitmap, and SVG),
+            and Metafiles.
+         */
+        Primitive2DSequence create2DDecompositionOfGraphic(
+            const Graphic& rGraphic,
+            const basegfx::B2DHomMatrix& rTransform);
+	} // end of namespace primitive2d
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif // INCLUDED_DRAWINGLAYER_PRIMITIVE2D_GRAPHICPRIMITIVEHELPER2D_HXX
+
+//////////////////////////////////////////////////////////////////////////////
+// eof

Propchange: incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/primitive2d/graphicprimitivehelper2d.hxx
------------------------------------------------------------------------------
    svn:executable = *

Modified: incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx?rev=1398711&r1=1398710&r2=1398711&view=diff
==============================================================================
--- incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx (original)
+++ incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx Tue Oct 16 09:44:02 2012
@@ -26,7 +26,7 @@
 
 #include <drawinglayer/drawinglayerdllapi.h>
 #include <drawinglayer/primitive2d/baseprimitive2d.hxx>
-#include <drawinglayer/attribute/fillbitmapattribute.hxx>
+#include <drawinglayer/attribute/fillgraphicattribute.hxx>
 #include <basegfx/polygon/b2dpolypolygon.hxx>
 #include <drawinglayer/attribute/lineattribute.hxx>
 #include <drawinglayer/attribute/strokeattribute.hxx>
@@ -391,26 +391,26 @@ namespace drawinglayer
 } // end of namespace drawinglayer
 
 //////////////////////////////////////////////////////////////////////////////
-// PolyPolygonBitmapPrimitive2D class
+// PolyPolygonGraphicPrimitive2D class
 
 namespace drawinglayer
 {
 	namespace primitive2d
 	{
-        /** PolyPolygonBitmapPrimitive2D class
+        /** PolyPolygonGraphicPrimitive2D class
 
             This primitive defines a PolyPolygon filled with bitmap data 
             (including transparence). The decomosition will create a MaskPrimitive2D 
-            containing a FillBitmapPrimitive2D.
+            containing a FillGraphicPrimitive2D.
          */
-		class DRAWINGLAYER_DLLPUBLIC PolyPolygonBitmapPrimitive2D : public BufferedDecompositionPrimitive2D
+		class DRAWINGLAYER_DLLPUBLIC PolyPolygonGraphicPrimitive2D : public BufferedDecompositionPrimitive2D
 		{
 		private:
             /// the PolyPolygon geometry
 			basegfx::B2DPolyPolygon						maPolyPolygon;
 
             /// the bitmap fill definition (may include tiling)
-			attribute::FillBitmapAttribute				maFillBitmap;
+			attribute::FillGraphicAttribute				maFillGraphic;
 
 		protected:
 			/// local decomposition.
@@ -418,13 +418,13 @@ namespace drawinglayer
 
 		public:
             /// constructor
-			PolyPolygonBitmapPrimitive2D(
+			PolyPolygonGraphicPrimitive2D(
 				const basegfx::B2DPolyPolygon& rPolyPolygon, 
-				const attribute::FillBitmapAttribute& rFillBitmap);
+				const attribute::FillGraphicAttribute& rFillGraphic);
 
 			/// data read access
 			const basegfx::B2DPolyPolygon& getB2DPolyPolygon() const { return maPolyPolygon; }
-			const attribute::FillBitmapAttribute& getFillBitmap() const { return maFillBitmap; }
+			const attribute::FillGraphicAttribute& getFillGraphic() const { return maFillGraphic; }
 
 			/// compare operator
 			virtual bool operator==(const BasePrimitive2D& rPrimitive) const;

Modified: incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx?rev=1398711&r1=1398710&r2=1398711&view=diff
==============================================================================
--- incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx (original)
+++ incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx Tue Oct 16 09:44:02 2012
@@ -26,7 +26,7 @@
 
 #include <drawinglayer/drawinglayerdllapi.h>
 #include <drawinglayer/primitive3d/groupprimitive3d.hxx>
-#include <drawinglayer/attribute/fillbitmapattribute.hxx>
+#include <drawinglayer/attribute/fillgraphicattribute.hxx>
 #include <basegfx/matrix/b2dhommatrix.hxx>
 #include <basegfx/vector/b2dvector.hxx>
 #include <drawinglayer/attribute/fillgradientattribute.hxx>
@@ -172,19 +172,19 @@ namespace drawinglayer
 		{
 		private:
             /// bitmap fill attribute
-			attribute::FillBitmapAttribute		maFillBitmapAttribute;
+			attribute::FillGraphicAttribute     maFillGraphicAttribute;
 
 		public:
             /// constructor
 			BitmapTexturePrimitive3D(
-				const attribute::FillBitmapAttribute& rFillBitmapAttribute, 
+				const attribute::FillGraphicAttribute& rFillGraphicAttribute, 
 				const Primitive3DSequence& rChildren, 
 				const basegfx::B2DVector& rTextureSize, 
 				bool bModulate, 
 				bool bFilter);
 
 			/// data read access
-			const attribute::FillBitmapAttribute& getFillBitmapAttribute() const { return maFillBitmapAttribute; }
+			const attribute::FillGraphicAttribute& getFillGraphicAttribute() const { return maFillGraphicAttribute; }
 
 			/// compare operator
 			virtual bool operator==(const BasePrimitive3D& rPrimitive) const;

Modified: incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx?rev=1398711&r1=1398710&r2=1398711&view=diff
==============================================================================
--- incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx (original)
+++ incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx Tue Oct 16 09:44:02 2012
@@ -38,9 +38,9 @@ namespace drawinglayer { namespace primi
 	class TextSimplePortionPrimitive2D;
 	class PolygonHairlinePrimitive2D;
 	class BitmapPrimitive2D;
-	class FillBitmapPrimitive2D;
+	class FillGraphicPrimitive2D;
 	class PolyPolygonGradientPrimitive2D;
-	class PolyPolygonBitmapPrimitive2D;
+	class PolyPolygonGraphicPrimitive2D;
 	class PolyPolygonColorPrimitive2D;
 	class MetafilePrimitive2D;
 	class MaskPrimitive2D;
@@ -96,9 +96,9 @@ namespace drawinglayer
             void RenderTextSimpleOrDecoratedPortionPrimitive2D(const primitive2d::TextSimplePortionPrimitive2D& rTextCandidate);
 			void RenderPolygonHairlinePrimitive2D(const primitive2d::PolygonHairlinePrimitive2D& rPolygonCandidate, bool bPixelBased);
 			void RenderBitmapPrimitive2D(const primitive2d::BitmapPrimitive2D& rBitmapCandidate);
-			void RenderFillBitmapPrimitive2D(const primitive2d::FillBitmapPrimitive2D& rFillBitmapCandidate);
+			void RenderFillGraphicPrimitive2D(const primitive2d::FillGraphicPrimitive2D& rFillBitmapCandidate);
 			void RenderPolyPolygonGradientPrimitive2D(const primitive2d::PolyPolygonGradientPrimitive2D& rPolygonCandidate);
-			void RenderPolyPolygonBitmapPrimitive2D(const primitive2d::PolyPolygonBitmapPrimitive2D& rPolygonCandidate);
+			void RenderPolyPolygonGraphicPrimitive2D(const primitive2d::PolyPolygonGraphicPrimitive2D& rPolygonCandidate);
 			void RenderPolyPolygonColorPrimitive2D(const primitive2d::PolyPolygonColorPrimitive2D& rPolygonCandidate);
 			void RenderMetafilePrimitive2D(const primitive2d::MetafilePrimitive2D& rPolygonCandidate);
 			void RenderMaskPrimitive2DPixel(const primitive2d::MaskPrimitive2D& rMaskCandidate);

Modified: incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/texture/texture.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/texture/texture.hxx?rev=1398711&r1=1398710&r2=1398711&view=diff
==============================================================================
--- incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/texture/texture.hxx (original)
+++ incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/texture/texture.hxx Tue Oct 16 09:44:02 2012
@@ -309,16 +309,27 @@ namespace drawinglayer
 {
 	namespace texture
 	{
+        // This class applies a tiling to the unit range. The given range
+        // will be repeated inside the unit range in X and Y and for each
+        // tile a matrix will be created (by appendTransformations) that
+        // represents the needed transformation to map a filling in unit 
+        // coordinates to that tile.
+        // When offsetX is given, every 2nd line will be ofsetted by the 
+        // given percentage value (offsetX has to be 0.0 <= offsetX <= 1.0).
+        // Accordingly to offsetY. If both are given, offsetX is preferred 
+        // and offsetY is ignored.
 		class DRAWINGLAYER_DLLPUBLIC GeoTexSvxTiled : public GeoTexSvx
 		{
 		protected:
-			basegfx::B2DPoint							maTopLeft;
-			basegfx::B2DVector							maSize;
+			basegfx::B2DRange               maRange;
+			double                          mfOffsetX;
+			double                          mfOffsetY;
 
 		public:
 			GeoTexSvxTiled(
-                const basegfx::B2DPoint& rTopLeft, 
-                const basegfx::B2DVector& rSize);
+                const basegfx::B2DRange& rRange, 
+                double fOffsetX = 0.0,
+                double fOffsetY = 0.0);
 			virtual ~GeoTexSvxTiled();
 
 			// compare operator

Modified: incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/texture/texture3d.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/texture/texture3d.hxx?rev=1398711&r1=1398710&r2=1398711&view=diff
==============================================================================
--- incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/texture/texture3d.hxx (original)
+++ incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/texture/texture3d.hxx Tue Oct 16 09:44:02 2012
@@ -26,7 +26,7 @@
 
 #include <drawinglayer/drawinglayerdllapi.h>
 #include <drawinglayer/texture/texture.hxx>
-#include <vcl/bitmap.hxx>
+#include <vcl/bitmapex.hxx>
 
 //////////////////////////////////////////////////////////////////////////////
 // predeclarations
@@ -48,7 +48,9 @@ namespace drawinglayer
 			double										mfOpacity;
 
 		public:
-			GeoTexSvxMono(const basegfx::BColor& rSingleColor, double fOpacity);
+			GeoTexSvxMono(
+                const basegfx::BColor& rSingleColor, 
+                double fOpacity);
 
 			// compare operator
 			virtual bool operator==(const GeoTexSvx& rGeoTexSvx) const;
@@ -64,23 +66,33 @@ namespace drawinglayer
 {
 	namespace texture
 	{
-		class DRAWINGLAYER_DLLPUBLIC GeoTexSvxBitmap : public GeoTexSvx
+		class DRAWINGLAYER_DLLPUBLIC GeoTexSvxBitmapEx : public GeoTexSvx
 		{
 		protected:
-			Bitmap										maBitmap;
-			BitmapReadAccess*							mpRead;
+			BitmapEx									maBitmapEx;
+			BitmapReadAccess*							mpReadBitmap;
+            Bitmap                                      maTransparence;
+            BitmapReadAccess*							mpReadTransparence;
 			basegfx::B2DPoint							maTopLeft;
 			basegfx::B2DVector							maSize;
 			double										mfMulX;
 			double										mfMulY;
 
+            /// bitfield
+            bool                                        mbIsAlpha : 1;
+            bool                                        mbIsTransparent : 1;
+
 			// helpers
 			bool impIsValid(const basegfx::B2DPoint& rUV, sal_Int32& rX, sal_Int32& rY) const;
+            sal_uInt8 impGetTransparence(sal_Int32& rX, sal_Int32& rY) const;
 
 		public:
-			GeoTexSvxBitmap(const Bitmap& rBitmap, const basegfx::B2DPoint& rTopLeft, const basegfx::B2DVector& rSize);
-			virtual ~GeoTexSvxBitmap();
-			virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const;
+			GeoTexSvxBitmapEx(
+                const BitmapEx& rBitmapEx, 
+                const basegfx::B2DRange& rRange);
+			virtual ~GeoTexSvxBitmapEx();
+
+            virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const;
 			virtual void modifyOpacity(const basegfx::B2DPoint& rUV, double& rfOpacity) const;
 		};
 	} // end of namespace texture
@@ -92,31 +104,27 @@ namespace drawinglayer
 {
 	namespace texture
 	{
-		class DRAWINGLAYER_DLLPUBLIC GeoTexSvxBitmapTiled : public GeoTexSvxBitmap
+		class DRAWINGLAYER_DLLPUBLIC GeoTexSvxBitmapExTiled : public GeoTexSvxBitmapEx
 		{
 		protected:
-			// helpers
-			basegfx::B2DPoint impGetCorrected(const basegfx::B2DPoint& rUV) const
-			{
-				double fX(fmod(rUV.getX() - maTopLeft.getX(), maSize.getX()));
-				double fY(fmod(rUV.getY() - maTopLeft.getY(), maSize.getY()));
-
-				if(fX < 0.0)
-				{
-					fX += maSize.getX();
-				}
-
-				if(fY < 0.0)
-				{
-					fY += maSize.getY();
-				}
+            double                                      mfOffsetX;
+            double                                      mfOffsetY;
 
-				return basegfx::B2DPoint(fX + maTopLeft.getX(), fY + maTopLeft.getY());
-			}
+            /// bitfield
+            bool                                        mbUseOffsetX : 1;
+            bool                                        mbUseOffsetY : 1;
+
+			// helpers
+			basegfx::B2DPoint impGetCorrected(const basegfx::B2DPoint& rUV) const;
 
 		public:
-			GeoTexSvxBitmapTiled(const Bitmap& rBitmap, const basegfx::B2DPoint& rTopLeft, const basegfx::B2DVector& rSize);
-			virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const;
+			GeoTexSvxBitmapExTiled(
+                const BitmapEx& rBitmapEx, 
+                const basegfx::B2DRange& rRange,
+                double fOffsetX = 0.0,
+                double fOffsetY = 0.0);
+
+            virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const;
 			virtual void modifyOpacity(const basegfx::B2DPoint& rUV, double& rfOpacity) const;
 		};
 	} // end of namespace texture

Added: incubator/ooo/trunk/main/drawinglayer/source/attribute/fillgraphicattribute.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/drawinglayer/source/attribute/fillgraphicattribute.cxx?rev=1398711&view=auto
==============================================================================
--- incubator/ooo/trunk/main/drawinglayer/source/attribute/fillgraphicattribute.cxx (added)
+++ incubator/ooo/trunk/main/drawinglayer/source/attribute/fillgraphicattribute.cxx Tue Oct 16 09:44:02 2012
@@ -0,0 +1,215 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_drawinglayer.hxx"
+
+#include <drawinglayer/attribute/fillgraphicattribute.hxx>
+#include <vcl/graph.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+	namespace attribute
+	{
+		class ImpFillGraphicAttribute
+		{
+		public:
+			// refcounter
+			sal_uInt32								mnRefCount;
+
+            // data definitions
+			Graphic                                 maGraphic;
+			basegfx::B2DRange						maGraphicRange;
+
+            // tiling definitions, offsets in X/Y in percent for each 2nd row.
+            // If both are set, Y is ignored (X has precedence)
+            double                                  mfOffsetX;
+            double                                  mfOffsetY;
+
+			// bitfield
+			unsigned								mbTiling : 1;
+
+			ImpFillGraphicAttribute(
+                const Graphic& rGraphic, 
+                const basegfx::B2DRange& rGraphicRange, 
+                bool bTiling,
+                double fOffsetX,
+                double fOffsetY)
+			:	mnRefCount(0),
+		    	maGraphic(rGraphic),
+			    maGraphicRange(rGraphicRange),
+			    mbTiling(bTiling),
+                mfOffsetX(fOffsetX),
+                mfOffsetY(fOffsetY)
+		    {
+		    }
+
+			// data read access
+			const Graphic& getGraphic() const { return maGraphic; }
+			const basegfx::B2DRange& getGraphicRange() const { return maGraphicRange; }
+			bool getTiling() const { return mbTiling; }
+            double getOffsetX() const { return mfOffsetX; }
+            double getOffsetY() const { return mfOffsetY; }
+
+            bool operator==(const ImpFillGraphicAttribute& rCandidate) const
+		    {
+			    return (getGraphic() == rCandidate.getGraphic()
+				    && getGraphicRange() == rCandidate.getGraphicRange()
+				    && getTiling() == rCandidate.getTiling()
+                    && getOffsetX() == rCandidate.getOffsetX()
+                    && getOffsetY() == rCandidate.getOffsetY());
+		    }
+
+            static ImpFillGraphicAttribute* get_global_default()
+            {
+                static ImpFillGraphicAttribute* pDefault = 0;
+
+                if(!pDefault)
+                {
+                    pDefault = new ImpFillGraphicAttribute(
+                        Graphic(),
+                        basegfx::B2DRange(),
+                        false,
+                        0.0, 
+                        0.0);
+
+                    // never delete; start with RefCount 1, not 0
+    			    pDefault->mnRefCount++;
+                }
+
+                return pDefault;
+            }
+		};
+
+        FillGraphicAttribute::FillGraphicAttribute(
+            const Graphic& rGraphic, 
+            const basegfx::B2DRange& rGraphicRange, 
+            bool bTiling,
+            double fOffsetX,
+            double fOffsetY)
+		:	mpFillGraphicAttribute(
+                new ImpFillGraphicAttribute(
+                    rGraphic, 
+                    rGraphicRange, 
+                    bTiling, 
+                    basegfx::clamp(fOffsetX, 0.0, 1.0), 
+                    basegfx::clamp(fOffsetY, 0.0, 1.0)))
+		{
+		}
+
+		FillGraphicAttribute::FillGraphicAttribute()
+        :	mpFillGraphicAttribute(ImpFillGraphicAttribute::get_global_default())
+		{
+			mpFillGraphicAttribute->mnRefCount++;
+		}
+
+        FillGraphicAttribute::FillGraphicAttribute(const FillGraphicAttribute& rCandidate)
+		:	mpFillGraphicAttribute(rCandidate.mpFillGraphicAttribute)
+		{
+			mpFillGraphicAttribute->mnRefCount++;
+		}
+
+		FillGraphicAttribute::~FillGraphicAttribute()
+		{
+			if(mpFillGraphicAttribute->mnRefCount)
+			{
+				mpFillGraphicAttribute->mnRefCount--;
+			}
+			else
+			{
+				delete mpFillGraphicAttribute;
+			}
+		}
+
+        bool FillGraphicAttribute::isDefault() const
+        {
+            return mpFillGraphicAttribute == ImpFillGraphicAttribute::get_global_default();
+        }
+
+        FillGraphicAttribute& FillGraphicAttribute::operator=(const FillGraphicAttribute& rCandidate)
+		{
+			if(rCandidate.mpFillGraphicAttribute != mpFillGraphicAttribute)
+			{
+				if(mpFillGraphicAttribute->mnRefCount)
+				{
+					mpFillGraphicAttribute->mnRefCount--;
+				}
+				else
+				{
+					delete mpFillGraphicAttribute;
+				}
+				
+				mpFillGraphicAttribute = rCandidate.mpFillGraphicAttribute;
+				mpFillGraphicAttribute->mnRefCount++;
+			}
+
+			return *this;
+		}
+
+		bool FillGraphicAttribute::operator==(const FillGraphicAttribute& rCandidate) const
+		{
+			if(rCandidate.mpFillGraphicAttribute == mpFillGraphicAttribute)
+			{
+				return true;
+			}
+
+			if(rCandidate.isDefault() != isDefault())
+			{
+				return false;
+			}
+
+			return (*rCandidate.mpFillGraphicAttribute == *mpFillGraphicAttribute);
+		}
+
+        const Graphic& FillGraphicAttribute::getGraphic() const 
+        { 
+            return mpFillGraphicAttribute->getGraphic(); 
+        }
+
+        const basegfx::B2DRange& FillGraphicAttribute::getGraphicRange() const 
+        { 
+            return mpFillGraphicAttribute->getGraphicRange(); 
+        }
+
+        bool FillGraphicAttribute::getTiling() const 
+        { 
+            return mpFillGraphicAttribute->getTiling(); 
+        }
+
+        double FillGraphicAttribute::getOffsetX() const
+        {
+            return mpFillGraphicAttribute->getOffsetX();
+        }
+
+        double FillGraphicAttribute::getOffsetY() const
+        {
+            return mpFillGraphicAttribute->getOffsetY();
+        }
+
+    } // end of namespace attribute
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+// eof

Propchange: incubator/ooo/trunk/main/drawinglayer/source/attribute/fillgraphicattribute.cxx
------------------------------------------------------------------------------
    svn:executable = *

Modified: incubator/ooo/trunk/main/drawinglayer/source/attribute/sdrfillattribute.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/drawinglayer/source/attribute/sdrfillattribute.cxx?rev=1398711&r1=1398710&r2=1398711&view=diff
==============================================================================
--- incubator/ooo/trunk/main/drawinglayer/source/attribute/sdrfillattribute.cxx (original)
+++ incubator/ooo/trunk/main/drawinglayer/source/attribute/sdrfillattribute.cxx Tue Oct 16 09:44:02 2012
@@ -24,7 +24,7 @@
 
 #include <drawinglayer/attribute/sdrfillattribute.hxx>
 #include <basegfx/color/bcolor.hxx>
-#include <drawinglayer/attribute/sdrfillbitmapattribute.hxx>
+#include <drawinglayer/attribute/sdrfillgraphicattribute.hxx>
 #include <drawinglayer/attribute/fillhatchattribute.hxx>
 #include <drawinglayer/attribute/fillgradientattribute.hxx>
 
@@ -45,7 +45,7 @@ namespace drawinglayer
 			basegfx::BColor						maColor;			// fill color
 			FillGradientAttribute				maGradient;			// fill gradient (if used)
 			FillHatchAttribute					maHatch;			// fill hatch (if used)
-			SdrFillBitmapAttribute				maBitmap;			// fill bitmap (if used)
+			SdrFillGraphicAttribute				maFillGraphic;		// fill graphic (if used)
 
 		public:
 			ImpSdrFillAttribute(
@@ -53,13 +53,13 @@ namespace drawinglayer
                 const basegfx::BColor& rColor, 
                 const FillGradientAttribute& rGradient, 
 				const FillHatchAttribute& rHatch, 
-                const SdrFillBitmapAttribute& rBitmap)
+                const SdrFillGraphicAttribute& rFillGraphic)
 			:	mnRefCount(0),
 			    mfTransparence(fTransparence),
 			    maColor(rColor),
 			    maGradient(rGradient),
 			    maHatch(rHatch),
-			    maBitmap(rBitmap)
+			    maFillGraphic(rFillGraphic)
             {
             }
 
@@ -68,7 +68,7 @@ namespace drawinglayer
 			const basegfx::BColor& getColor() const { return maColor; }
 			const FillGradientAttribute& getGradient() const { return maGradient; }
 			const FillHatchAttribute& getHatch() const { return maHatch; }
-			const SdrFillBitmapAttribute& getBitmap() const { return maBitmap; }
+			const SdrFillGraphicAttribute& getFillGraphic() const { return maFillGraphic; }
 
             // compare operator
 			bool operator==(const ImpSdrFillAttribute& rCandidate) const
@@ -77,7 +77,7 @@ namespace drawinglayer
                     && getColor() == rCandidate.getColor()
                     && getGradient() == rCandidate.getGradient()
                     && getHatch() == rCandidate.getHatch()
-                    && getBitmap() == rCandidate.getBitmap());
+                    && getFillGraphic() == rCandidate.getFillGraphic());
             }
 
             static ImpSdrFillAttribute* get_global_default()
@@ -91,7 +91,7 @@ namespace drawinglayer
                         basegfx::BColor(),
                         FillGradientAttribute(),
 				        FillHatchAttribute(),
-                        SdrFillBitmapAttribute());
+                        SdrFillGraphicAttribute());
 
                     // never delete; start with RefCount 1, not 0
     			    pDefault->mnRefCount++;
@@ -106,9 +106,10 @@ namespace drawinglayer
             const basegfx::BColor& rColor, 
             const FillGradientAttribute& rGradient, 
 			const FillHatchAttribute& rHatch, 
-            const SdrFillBitmapAttribute& rBitmap)
-		:	mpSdrFillAttribute(new ImpSdrFillAttribute(
-                fTransparence, rColor, rGradient, rHatch, rBitmap))
+            const SdrFillGraphicAttribute& rFillGraphic)
+		:	mpSdrFillAttribute(
+                new ImpSdrFillAttribute(
+                    fTransparence, rColor, rGradient, rHatch, rFillGraphic))
 		{
 		}
 
@@ -196,9 +197,9 @@ namespace drawinglayer
             return mpSdrFillAttribute->getHatch(); 
         }
 
-		const SdrFillBitmapAttribute& SdrFillAttribute::getBitmap() const 
+		const SdrFillGraphicAttribute& SdrFillAttribute::getFillGraphic() const 
         { 
-            return mpSdrFillAttribute->getBitmap(); 
+            return mpSdrFillAttribute->getFillGraphic(); 
         }
     } // end of namespace attribute
 } // end of namespace drawinglayer

Added: incubator/ooo/trunk/main/drawinglayer/source/attribute/sdrfillgraphicattribute.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/drawinglayer/source/attribute/sdrfillgraphicattribute.cxx?rev=1398711&view=auto
==============================================================================
--- incubator/ooo/trunk/main/drawinglayer/source/attribute/sdrfillgraphicattribute.cxx (added)
+++ incubator/ooo/trunk/main/drawinglayer/source/attribute/sdrfillgraphicattribute.cxx Tue Oct 16 09:44:02 2012
@@ -0,0 +1,355 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_drawinglayer.hxx"
+
+#include <drawinglayer/attribute/sdrfillgraphicattribute.hxx>
+#include <drawinglayer/attribute/fillgraphicattribute.hxx>
+#include <vcl/graph.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+	namespace attribute
+	{
+		class ImpSdrFillGraphicAttribute
+		{
+        public:
+		    // refcounter
+		    sal_uInt32								mnRefCount;
+
+            // data definitions
+			Graphic                                 maFillGraphic;
+			basegfx::B2DVector						maSize;
+			basegfx::B2DVector						maOffset;
+			basegfx::B2DVector						maOffsetPosition;
+			basegfx::B2DVector						maRectPoint;
+
+			// bitfield
+			unsigned								mbTiling : 1;
+			unsigned								mbStretch : 1;
+			unsigned								mbLogSize : 1;
+
+			ImpSdrFillGraphicAttribute(
+				const Graphic& rFillGraphic, 
+                const basegfx::B2DVector& rSize, 
+                const basegfx::B2DVector& rOffset,
+				const basegfx::B2DVector& rOffsetPosition, 
+                const basegfx::B2DVector& rRectPoint,
+				bool bTiling, 
+                bool bStretch, 
+                bool bLogSize)
+		    :	mnRefCount(0),
+		    	maFillGraphic(rFillGraphic),
+			    maSize(rSize),
+			    maOffset(rOffset),
+			    maOffsetPosition(rOffsetPosition),
+			    maRectPoint(rRectPoint),
+			    mbTiling(bTiling),
+			    mbStretch(bStretch),
+			    mbLogSize(bLogSize)
+		    {
+		    }
+
+			// data read access
+            const Graphic& getFillGraphic() const { return maFillGraphic; }
+            const basegfx::B2DVector& getSize() const { return maSize; }
+            const basegfx::B2DVector& getOffset() const { return maOffset; }
+            const basegfx::B2DVector& getOffsetPosition() const { return maOffsetPosition; }
+            const basegfx::B2DVector& getRectPoint() const { return maRectPoint; }
+            bool getTiling() const { return mbTiling; }
+            bool getStretch() const { return mbStretch; }
+            bool getLogSize() const { return mbLogSize; }
+
+            bool operator==(const ImpSdrFillGraphicAttribute& rCandidate) const
+            {
+			    return (getFillGraphic() == rCandidate.getFillGraphic()
+				    && getSize() == rCandidate.getSize()
+				    && getOffset() == rCandidate.getOffset()
+				    && getOffsetPosition() == rCandidate.getOffsetPosition()
+				    && getRectPoint() == rCandidate.getRectPoint()
+				    && getTiling() == rCandidate.getTiling() 
+				    && getStretch() == rCandidate.getStretch() 
+				    && getLogSize() == rCandidate.getLogSize());
+            }
+            
+            static ImpSdrFillGraphicAttribute* get_global_default()
+            {
+                static ImpSdrFillGraphicAttribute* pDefault = 0;
+
+                if(!pDefault)
+                {
+                    pDefault = new ImpSdrFillGraphicAttribute(
+			            Graphic(),
+                        basegfx::B2DVector(),
+                        basegfx::B2DVector(),
+			            basegfx::B2DVector(),
+                        basegfx::B2DVector(),
+			            false, 
+                        false, 
+                        false);
+
+                    // never delete; start with RefCount 1, not 0
+    			    pDefault->mnRefCount++;
+                }
+
+                return pDefault;
+            }
+		};
+
+        SdrFillGraphicAttribute::SdrFillGraphicAttribute(
+			const Graphic& rFillGraphic, 
+            const basegfx::B2DVector& rSize, 
+            const basegfx::B2DVector& rOffset,
+			const basegfx::B2DVector& rOffsetPosition, 
+            const basegfx::B2DVector& rRectPoint,
+			bool bTiling, 
+            bool bStretch, 
+            bool bLogSize)
+		:	mpSdrFillGraphicAttribute(
+                new ImpSdrFillGraphicAttribute(
+                    rFillGraphic, 
+                    rSize, 
+                    rOffset, 
+                    rOffsetPosition, 
+                    rRectPoint, 
+                    bTiling,  
+                    bStretch, 
+                    bLogSize))
+		{
+		}
+
+		SdrFillGraphicAttribute::SdrFillGraphicAttribute()
+        :	mpSdrFillGraphicAttribute(ImpSdrFillGraphicAttribute::get_global_default())
+		{
+			mpSdrFillGraphicAttribute->mnRefCount++;
+		}
+
+        SdrFillGraphicAttribute::SdrFillGraphicAttribute(const SdrFillGraphicAttribute& rCandidate)
+		:	mpSdrFillGraphicAttribute(rCandidate.mpSdrFillGraphicAttribute)
+		{
+			mpSdrFillGraphicAttribute->mnRefCount++;
+		}
+
+		SdrFillGraphicAttribute::~SdrFillGraphicAttribute()
+		{
+			if(mpSdrFillGraphicAttribute->mnRefCount)
+			{
+				mpSdrFillGraphicAttribute->mnRefCount--;
+			}
+			else
+			{
+				delete mpSdrFillGraphicAttribute;
+			}
+		}
+
+        bool SdrFillGraphicAttribute::isDefault() const
+        {
+            return mpSdrFillGraphicAttribute == ImpSdrFillGraphicAttribute::get_global_default();
+        }
+
+        SdrFillGraphicAttribute& SdrFillGraphicAttribute::operator=(const SdrFillGraphicAttribute& rCandidate)
+		{
+			if(rCandidate.mpSdrFillGraphicAttribute != mpSdrFillGraphicAttribute)
+			{
+				if(mpSdrFillGraphicAttribute->mnRefCount)
+				{
+					mpSdrFillGraphicAttribute->mnRefCount--;
+				}
+				else
+				{
+					delete mpSdrFillGraphicAttribute;
+				}
+				
+				mpSdrFillGraphicAttribute = rCandidate.mpSdrFillGraphicAttribute;
+				mpSdrFillGraphicAttribute->mnRefCount++;
+			}
+
+			return *this;
+		}
+
+		bool SdrFillGraphicAttribute::operator==(const SdrFillGraphicAttribute& rCandidate) const
+		{
+			if(rCandidate.mpSdrFillGraphicAttribute == mpSdrFillGraphicAttribute)
+			{
+				return true;
+			}
+
+			if(rCandidate.isDefault() != isDefault())
+			{
+				return false;
+			}
+
+			return (*rCandidate.mpSdrFillGraphicAttribute == *mpSdrFillGraphicAttribute);
+		}
+
+        const Graphic& SdrFillGraphicAttribute::getFillGraphic() const 
+        { 
+            return mpSdrFillGraphicAttribute->getFillGraphic(); 
+        }
+
+        const basegfx::B2DVector& SdrFillGraphicAttribute::getSize() const 
+        { 
+            return mpSdrFillGraphicAttribute->getSize(); 
+        }
+
+        const basegfx::B2DVector& SdrFillGraphicAttribute::getOffset() const 
+        { 
+            return mpSdrFillGraphicAttribute->getOffset(); 
+        }
+
+        const basegfx::B2DVector& SdrFillGraphicAttribute::getOffsetPosition() const 
+        { 
+            return mpSdrFillGraphicAttribute->getOffsetPosition(); 
+        }
+
+        const basegfx::B2DVector& SdrFillGraphicAttribute::getRectPoint() const 
+        { 
+            return mpSdrFillGraphicAttribute->getRectPoint(); 
+        }
+
+        bool SdrFillGraphicAttribute::getTiling() const 
+        { 
+            return mpSdrFillGraphicAttribute->getTiling(); 
+        }
+
+        bool SdrFillGraphicAttribute::getStretch() const 
+        { 
+            return mpSdrFillGraphicAttribute->getStretch(); 
+        }
+
+        bool SdrFillGraphicAttribute::getLogSize() const 
+        { 
+            return mpSdrFillGraphicAttribute->getLogSize(); 
+        }
+
+        FillGraphicAttribute SdrFillGraphicAttribute::createFillGraphicAttribute(const basegfx::B2DRange& rRange) const
+		{
+			// get logical size of bitmap (before expanding eventually)
+			Graphic aGraphic(getFillGraphic());
+			const basegfx::B2DVector aLogicalSize(aGraphic.GetPrefSize().getWidth(), aGraphic.GetPrefSize().getHeight());
+
+			// init values with defaults
+			basegfx::B2DPoint aBitmapSize(1.0, 1.0);
+			basegfx::B2DVector aBitmapTopLeft(0.0, 0.0);
+
+			// are changes needed?
+			if(getTiling() || !getStretch())
+			{
+				// init values with range sizes
+				const double fRangeWidth(0.0 != rRange.getWidth() ? rRange.getWidth() : 1.0);
+				const double fRangeHeight(0.0 != rRange.getHeight() ? rRange.getHeight() : 1.0);
+				aBitmapSize = basegfx::B2DPoint(fRangeWidth, fRangeHeight);
+
+				// size changes
+				if(0.0 != getSize().getX())
+				{
+					if(getSize().getX() < 0.0)
+					{
+						aBitmapSize.setX(aBitmapSize.getX() * (getSize().getX() * -0.01));
+					}
+					else
+					{
+						aBitmapSize.setX(getSize().getX());
+					}
+				}
+				else
+				{
+					aBitmapSize.setX(aLogicalSize.getX());
+				}
+
+				if(0.0 != getSize().getY())
+				{
+					if(getSize().getY() < 0.0)
+					{
+						aBitmapSize.setY(aBitmapSize.getY() * (getSize().getY() * -0.01));
+					}
+					else
+					{
+						aBitmapSize.setY(getSize().getY());
+					}
+				}
+				else
+				{
+					aBitmapSize.setY(aLogicalSize.getY());
+				}
+
+				// get values, force to centered if necessary
+				const basegfx::B2DVector aRectPoint(getTiling() ? getRectPoint() : basegfx::B2DVector(0.0, 0.0));
+
+				// position changes X
+				if(0.0 == aRectPoint.getX())
+				{
+					aBitmapTopLeft.setX((fRangeWidth - aBitmapSize.getX()) * 0.5);
+				}
+				else if(1.0 == aRectPoint.getX())
+				{
+					aBitmapTopLeft.setX(fRangeWidth - aBitmapSize.getX());
+				}
+
+				if(getTiling() && 0.0 != getOffsetPosition().getX())
+				{
+					aBitmapTopLeft.setX(aBitmapTopLeft.getX() + (aBitmapSize.getX() * (getOffsetPosition().getX() * 0.01)));
+				}
+
+				// position changes Y
+				if(0.0 == aRectPoint.getY())
+				{
+					aBitmapTopLeft.setY((fRangeHeight - aBitmapSize.getY()) * 0.5);
+				}
+				else if(1.0 == aRectPoint.getY())
+				{
+					aBitmapTopLeft.setY(fRangeHeight - aBitmapSize.getY());
+				}
+
+				if(getTiling() && 0.0 != getOffsetPosition().getY())
+				{
+					aBitmapTopLeft.setY(aBitmapTopLeft.getY() + (aBitmapSize.getY() * (getOffsetPosition().getY() * 0.01)));
+				}
+
+				// apply bitmap size scaling to unit rectangle
+				aBitmapTopLeft.setX(aBitmapTopLeft.getX() / fRangeWidth);
+				aBitmapTopLeft.setY(aBitmapTopLeft.getY() / fRangeHeight);
+				aBitmapSize.setX(aBitmapSize.getX() / fRangeWidth);
+				aBitmapSize.setY(aBitmapSize.getY() / fRangeHeight);
+			}
+
+            // get offset in percent
+            const double fOffsetX(basegfx::clamp(getOffset().getX() * 0.01, 0.0, 1.0));
+            const double fOffsetY(basegfx::clamp(getOffset().getY() * 0.01, 0.0, 1.0));
+
+            // create FillGraphicAttribute
+            return FillGraphicAttribute(
+                aGraphic, 
+                basegfx::B2DRange(aBitmapTopLeft, aBitmapTopLeft + aBitmapSize), 
+                getTiling(), 
+                fOffsetX,
+                fOffsetY);
+		}
+	} // end of namespace attribute
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+// eof

Propchange: incubator/ooo/trunk/main/drawinglayer/source/attribute/sdrfillgraphicattribute.cxx
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/ooo/trunk/main/drawinglayer/source/primitive2d/fillgraphicprimitive2d.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/drawinglayer/source/primitive2d/fillgraphicprimitive2d.cxx?rev=1398711&view=auto
==============================================================================
--- incubator/ooo/trunk/main/drawinglayer/source/primitive2d/fillgraphicprimitive2d.cxx (added)
+++ incubator/ooo/trunk/main/drawinglayer/source/primitive2d/fillgraphicprimitive2d.cxx Tue Oct 16 09:44:02 2012
@@ -0,0 +1,147 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_drawinglayer.hxx"
+
+#include <drawinglayer/primitive2d/fillgraphicprimitive2d.hxx>
+#include <drawinglayer/primitive2d/graphicprimitive2d.hxx>
+#include <basegfx/polygon/b2dpolygon.hxx>
+#include <basegfx/polygon/b2dpolygontools.hxx>
+#include <drawinglayer/texture/texture.hxx>
+#include <basegfx/matrix/b2dhommatrixtools.hxx>
+#include <drawinglayer/primitive2d/bitmapprimitive2d.hxx>
+#include <drawinglayer/primitive2d/metafileprimitive2d.hxx>
+#include <drawinglayer/primitive2d/transformprimitive2d.hxx>
+#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
+#include <drawinglayer/primitive2d/graphicprimitivehelper2d.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+
+using namespace com::sun::star;
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+	namespace primitive2d
+	{
+		Primitive2DSequence FillGraphicPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
+		{
+			Primitive2DSequence aRetval;
+			const attribute::FillGraphicAttribute& rAttribute = getFillGraphic();
+
+            if(!rAttribute.isDefault())
+            {
+                const Graphic& rGraphic = rAttribute.getGraphic();
+
+                if(GRAPHIC_BITMAP == rGraphic.GetType() || GRAPHIC_GDIMETAFILE == rGraphic.GetType())
+                {
+                    const Size aSize(rGraphic.GetPrefSize());
+
+                    if(aSize.Width() && aSize.Height())
+                    {
+                        // we have a graphic (bitmap or metafile) with some size
+                        if(rAttribute.getTiling())
+                        {
+                            // get object range and create tiling matrices
+                            ::std::vector< basegfx::B2DHomMatrix > aMatrices;
+                            texture::GeoTexSvxTiled aTiling(
+                                rAttribute.getGraphicRange(),
+                                rAttribute.getOffsetX(),
+                                rAttribute.getOffsetY());
+
+                            // get matrices and realloc retval
+                            aTiling.appendTransformations(aMatrices);
+                            aRetval.realloc(aMatrices.size());
+
+                            // prepare content primitive
+                            const Primitive2DSequence xSeq = create2DDecompositionOfGraphic(
+                                rGraphic,
+                                basegfx::B2DHomMatrix());
+
+                            for(sal_uInt32 a(0); a < aMatrices.size(); a++)
+                            {
+                                aRetval[a] = new TransformPrimitive2D(
+                                    getTransformation() * aMatrices[a],
+                                    xSeq);
+                            }
+                        }
+                        else
+                        {
+                            // add graphic without tiling
+                            const basegfx::B2DHomMatrix aObjectTransform(
+                                getTransformation() * basegfx::tools::createScaleTranslateB2DHomMatrix(
+                                    rAttribute.getGraphicRange().getRange(),
+                                    rAttribute.getGraphicRange().getMinimum()));
+
+                            aRetval = create2DDecompositionOfGraphic(
+                                rGraphic,
+                                aObjectTransform);
+                        }
+                    }
+                }
+            }
+
+			return aRetval;
+		}
+
+		FillGraphicPrimitive2D::FillGraphicPrimitive2D(
+			const basegfx::B2DHomMatrix& rTransformation, 
+			const attribute::FillGraphicAttribute& rFillGraphic)
+		:	BufferedDecompositionPrimitive2D(),
+			maTransformation(rTransformation),
+			maFillGraphic(rFillGraphic)
+		{
+		}
+
+		bool FillGraphicPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
+		{
+			if(BufferedDecompositionPrimitive2D::operator==(rPrimitive))
+			{
+				const FillGraphicPrimitive2D& rCompare = static_cast< const FillGraphicPrimitive2D& >(rPrimitive);
+
+				return (getTransformation() == rCompare.getTransformation()
+					&& getFillGraphic() == rCompare.getFillGraphic());
+			}
+
+			return false;
+		}
+
+		basegfx::B2DRange FillGraphicPrimitive2D::getB2DRange(const geometry::ViewInformation2D& /*rViewInformation*/) const
+		{
+			// return range of it
+			basegfx::B2DPolygon aPolygon(basegfx::tools::createUnitPolygon());
+			aPolygon.transform(getTransformation());
+
+            return basegfx::tools::getRange(aPolygon);
+		}
+
+		// provide unique ID
+		ImplPrimitrive2DIDBlock(FillGraphicPrimitive2D, PRIMITIVE2D_ID_FILLGRAPHICPRIMITIVE2D)
+
+	} // end of namespace primitive2d
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+// eof