1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef INCLUDED_DRAWINGLAYER_PROCESSOR2D_LINEGEOMETRYEXTRACTOR2D_HXX 25 #define INCLUDED_DRAWINGLAYER_PROCESSOR2D_LINEGEOMETRYEXTRACTOR2D_HXX 26 27 #include <drawinglayer/drawinglayerdllapi.h> 28 #include <drawinglayer/processor2d/baseprocessor2d.hxx> 29 #include <basegfx/polygon/b2dpolypolygon.hxx> 30 31 ////////////////////////////////////////////////////////////////////////////// 32 33 namespace drawinglayer 34 { 35 namespace processor2d 36 { 37 /** LineGeometryExtractor2D class 38 39 This processor can extract the line geometry from feeded primpitives. The 40 hairlines and the fille geometry from fat lines are separated. 41 */ 42 class DRAWINGLAYER_DLLPUBLIC LineGeometryExtractor2D : public BaseProcessor2D 43 { 44 private: 45 std::vector< basegfx::B2DPolygon > maExtractedHairlines; 46 std::vector< basegfx::B2DPolyPolygon > maExtractedLineFills; 47 48 /// bitfield 49 unsigned mbInLineGeometry : 1; 50 51 /// tooling methods 52 void processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate); 53 54 public: 55 LineGeometryExtractor2D(const geometry::ViewInformation2D& rViewInformation); 56 virtual ~LineGeometryExtractor2D(); 57 58 const std::vector< basegfx::B2DPolygon >& getExtractedHairlines() const { return maExtractedHairlines; } 59 const std::vector< basegfx::B2DPolyPolygon >& getExtractedLineFills() const { return maExtractedLineFills; } 60 }; 61 } // end of namespace processor2d 62 } // end of namespace drawinglayer 63 64 ////////////////////////////////////////////////////////////////////////////// 65 66 #endif // INCLUDED_DRAWINGLAYER_PROCESSOR2D_LINEGEOMETRYEXTRACTOR2D_HXX 67 68 // eof 69