1ddde725dSArmin Le Grand /************************************************************** 2ddde725dSArmin Le Grand * 3ddde725dSArmin Le Grand * Licensed to the Apache Software Foundation (ASF) under one 4ddde725dSArmin Le Grand * or more contributor license agreements. See the NOTICE file 5ddde725dSArmin Le Grand * distributed with this work for additional information 6ddde725dSArmin Le Grand * regarding copyright ownership. The ASF licenses this file 7ddde725dSArmin Le Grand * to you under the Apache License, Version 2.0 (the 8ddde725dSArmin Le Grand * "License"); you may not use this file except in compliance 9ddde725dSArmin Le Grand * with the License. You may obtain a copy of the License at 10ddde725dSArmin Le Grand * 11ddde725dSArmin Le Grand * http://www.apache.org/licenses/LICENSE-2.0 12ddde725dSArmin Le Grand * 13ddde725dSArmin Le Grand * Unless required by applicable law or agreed to in writing, 14ddde725dSArmin Le Grand * software distributed under the License is distributed on an 15ddde725dSArmin Le Grand * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16ddde725dSArmin Le Grand * KIND, either express or implied. See the License for the 17ddde725dSArmin Le Grand * specific language governing permissions and limitations 18ddde725dSArmin Le Grand * under the License. 19ddde725dSArmin Le Grand * 20ddde725dSArmin Le Grand *************************************************************/ 21ddde725dSArmin Le Grand 22ddde725dSArmin Le Grand #ifndef INCLUDED_SVGIO_SVGREADER_SVGCLIPPATHNODE_HXX 23ddde725dSArmin Le Grand #define INCLUDED_SVGIO_SVGREADER_SVGCLIPPATHNODE_HXX 24ddde725dSArmin Le Grand 25ddde725dSArmin Le Grand #include <svgio/svgiodllapi.h> 26ddde725dSArmin Le Grand #include <svgio/svgreader/svgnode.hxx> 27ddde725dSArmin Le Grand #include <svgio/svgreader/svgstyleattributes.hxx> 28ddde725dSArmin Le Grand 29ddde725dSArmin Le Grand ////////////////////////////////////////////////////////////////////////////// 30ddde725dSArmin Le Grand 31ddde725dSArmin Le Grand namespace svgio 32ddde725dSArmin Le Grand { 33ddde725dSArmin Le Grand namespace svgreader 34ddde725dSArmin Le Grand { 35ddde725dSArmin Le Grand class SvgClipPathNode : public SvgNode 36ddde725dSArmin Le Grand { 37ddde725dSArmin Le Grand private: 38ddde725dSArmin Le Grand /// use styles 39ddde725dSArmin Le Grand SvgStyleAttributes maSvgStyleAttributes; 40ddde725dSArmin Le Grand 41ddde725dSArmin Le Grand /// variable scan values, dependent of given XAttributeList 42ddde725dSArmin Le Grand basegfx::B2DHomMatrix* mpaTransform; 43ddde725dSArmin Le Grand SvgUnits maClipPathUnits; 44ddde725dSArmin Le Grand 45ddde725dSArmin Le Grand public: 46ddde725dSArmin Le Grand SvgClipPathNode( 47ddde725dSArmin Le Grand SvgDocument& rDocument, 48ddde725dSArmin Le Grand SvgNode* pParent); 49ddde725dSArmin Le Grand virtual ~SvgClipPathNode(); 50ddde725dSArmin Le Grand 51ddde725dSArmin Le Grand virtual const SvgStyleAttributes* getSvgStyleAttributes() const; 52ddde725dSArmin Le Grand virtual void parseAttribute(const rtl::OUString& rTokenName, SVGToken aSVGToken, const rtl::OUString& aContent); 53ddde725dSArmin Le Grand virtual void decomposeSvgNode(drawinglayer::primitive2d::Primitive2DSequence& rTarget, bool bReferenced) const; 54ddde725dSArmin Le Grand 55*e90e3a55SArmin Le Grand /// apply contained clipPath to given geometry #i124852# transform may be needed 56*e90e3a55SArmin Le Grand void apply( 57*e90e3a55SArmin Le Grand drawinglayer::primitive2d::Primitive2DSequence& rTarget, 58*e90e3a55SArmin Le Grand const basegfx::B2DHomMatrix* pTransform) const; 59ddde725dSArmin Le Grand 60ddde725dSArmin Le Grand /// clipPathUnits content getClipPathUnits() const61ddde725dSArmin Le Grand SvgUnits getClipPathUnits() const { return maClipPathUnits; } setClipPathUnits(const SvgUnits aClipPathUnits)62ddde725dSArmin Le Grand void setClipPathUnits(const SvgUnits aClipPathUnits) { maClipPathUnits = aClipPathUnits; } 63ddde725dSArmin Le Grand 64ddde725dSArmin Le Grand /// transform content getTransform() const65ddde725dSArmin Le Grand const basegfx::B2DHomMatrix* getTransform() const { return mpaTransform; } setTransform(const basegfx::B2DHomMatrix * pMatrix=0)66ddde725dSArmin Le Grand void setTransform(const basegfx::B2DHomMatrix* pMatrix = 0) { if(mpaTransform) delete mpaTransform; mpaTransform = 0; if(pMatrix) mpaTransform = new basegfx::B2DHomMatrix(*pMatrix); } 67ddde725dSArmin Le Grand }; 68ddde725dSArmin Le Grand } // end of namespace svgreader 69ddde725dSArmin Le Grand } // end of namespace svgio 70ddde725dSArmin Le Grand 71ddde725dSArmin Le Grand ////////////////////////////////////////////////////////////////////////////// 72ddde725dSArmin Le Grand 73ddde725dSArmin Le Grand #endif //INCLUDED_SVGIO_SVGREADER_SVGCLIPPATHNODE_HXX 74ddde725dSArmin Le Grand 75ddde725dSArmin Le Grand // eof 76