1*4f506f19SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*4f506f19SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*4f506f19SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*4f506f19SAndrew Rist * distributed with this work for additional information 6*4f506f19SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*4f506f19SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*4f506f19SAndrew Rist * "License"); you may not use this file except in compliance 9*4f506f19SAndrew Rist * with the License. You may obtain a copy of the License at 10*4f506f19SAndrew Rist * 11*4f506f19SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*4f506f19SAndrew Rist * 13*4f506f19SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*4f506f19SAndrew Rist * software distributed under the License is distributed on an 15*4f506f19SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*4f506f19SAndrew Rist * KIND, either express or implied. See the License for the 17*4f506f19SAndrew Rist * specific language governing permissions and limitations 18*4f506f19SAndrew Rist * under the License. 19*4f506f19SAndrew Rist * 20*4f506f19SAndrew Rist *************************************************************/ 21*4f506f19SAndrew Rist 22*4f506f19SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef INCLUDED_DRAWINGLAYER_PROCESSOR3D_GEOMETRY2DEXTRACTOR_HXX 25cdf0e10cSrcweir #define INCLUDED_DRAWINGLAYER_PROCESSOR3D_GEOMETRY2DEXTRACTOR_HXX 26cdf0e10cSrcweir 27090f0eb8SEike Rathke #include <drawinglayer/drawinglayerdllapi.h> 28cdf0e10cSrcweir #include <drawinglayer/processor3d/baseprocessor3d.hxx> 29cdf0e10cSrcweir #include <drawinglayer/primitive2d/baseprimitive2d.hxx> 30cdf0e10cSrcweir #include <basegfx/matrix/b2dhommatrix.hxx> 31cdf0e10cSrcweir #include <basegfx/matrix/b3dhommatrix.hxx> 32cdf0e10cSrcweir #include <basegfx/color/bcolormodifier.hxx> 33cdf0e10cSrcweir 34cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////////////// 35cdf0e10cSrcweir 36cdf0e10cSrcweir namespace drawinglayer 37cdf0e10cSrcweir { 38cdf0e10cSrcweir namespace processor3d 39cdf0e10cSrcweir { 40cdf0e10cSrcweir /** Geometry2DExtractingProcessor class 41cdf0e10cSrcweir 42cdf0e10cSrcweir This processor extracts the 2D geometry (projected geometry) of all feeded primitives. 43cdf0e10cSrcweir It is e.g. used as sub-processor for contour extraction where 3D geometry is only 44cdf0e10cSrcweir useful as 2D projected geometry. 45cdf0e10cSrcweir */ 46090f0eb8SEike Rathke class DRAWINGLAYER_DLLPUBLIC Geometry2DExtractingProcessor : public BaseProcessor3D 47cdf0e10cSrcweir { 48cdf0e10cSrcweir private: 49cdf0e10cSrcweir /// result holding vector (2D) 50cdf0e10cSrcweir primitive2d::Primitive2DSequence maPrimitive2DSequence; 51cdf0e10cSrcweir 52cdf0e10cSrcweir /// object transformation for scene for 2d definition 53cdf0e10cSrcweir basegfx::B2DHomMatrix maObjectTransformation; 54cdf0e10cSrcweir 55cdf0e10cSrcweir /// the modifiedColorPrimitive stack 56cdf0e10cSrcweir basegfx::BColorModifierStack maBColorModifierStack; 57cdf0e10cSrcweir 58cdf0e10cSrcweir /* as tooling, the process() implementation takes over API handling and calls this 59cdf0e10cSrcweir virtual render method when the primitive implementation is BasePrimitive3D-based. 60cdf0e10cSrcweir */ 61cdf0e10cSrcweir virtual void processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate); 62cdf0e10cSrcweir 63cdf0e10cSrcweir public: 64cdf0e10cSrcweir Geometry2DExtractingProcessor( 65cdf0e10cSrcweir const geometry::ViewInformation3D& rViewInformation, 66cdf0e10cSrcweir const basegfx::B2DHomMatrix& rObjectTransformation); 67cdf0e10cSrcweir 68cdf0e10cSrcweir // data read access getPrimitive2DSequence() const69cdf0e10cSrcweir const primitive2d::Primitive2DSequence& getPrimitive2DSequence() const { return maPrimitive2DSequence; } getObjectTransformation() const70cdf0e10cSrcweir const basegfx::B2DHomMatrix& getObjectTransformation() const { return maObjectTransformation; } getBColorModifierStack() const71cdf0e10cSrcweir const basegfx::BColorModifierStack& getBColorModifierStack() const { return maBColorModifierStack; } 72cdf0e10cSrcweir }; 73cdf0e10cSrcweir } // end of namespace processor3d 74cdf0e10cSrcweir } // end of namespace drawinglayer 75cdf0e10cSrcweir 76cdf0e10cSrcweir #endif //INCLUDED_DRAWINGLAYER_PROCESSOR3D_GEOMETRY2DEXTRACTOR_HXX 77cdf0e10cSrcweir 78cdf0e10cSrcweir // eof 79