Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : : #ifndef INCLUDED_DRAWINGLAYER_PROCESSOR3D_GEOMETRY2DEXTRACTOR_HXX
30 : : #define INCLUDED_DRAWINGLAYER_PROCESSOR3D_GEOMETRY2DEXTRACTOR_HXX
31 : :
32 : : #include <drawinglayer/drawinglayerdllapi.h>
33 : :
34 : : #include <drawinglayer/processor3d/baseprocessor3d.hxx>
35 : : #include <drawinglayer/primitive2d/baseprimitive2d.hxx>
36 : : #include <basegfx/matrix/b2dhommatrix.hxx>
37 : : #include <basegfx/matrix/b3dhommatrix.hxx>
38 : : #include <basegfx/color/bcolormodifier.hxx>
39 : :
40 : : //////////////////////////////////////////////////////////////////////////////
41 : :
42 : : namespace drawinglayer
43 : : {
44 : : namespace processor3d
45 : : {
46 : : /** Geometry2DExtractingProcessor class
47 : :
48 : : This processor extracts the 2D geometry (projected geometry) of all feeded primitives.
49 : : It is e.g. used as sub-processor for contour extraction where 3D geometry is only
50 : : useful as 2D projected geometry.
51 : : */
52 [ # # ][ # # ]: 0 : class DRAWINGLAYER_DLLPUBLIC Geometry2DExtractingProcessor : public BaseProcessor3D
[ # # ]
53 : : {
54 : : private:
55 : : /// result holding vector (2D)
56 : : primitive2d::Primitive2DSequence maPrimitive2DSequence;
57 : :
58 : : /// object transformation for scene for 2d definition
59 : : basegfx::B2DHomMatrix maObjectTransformation;
60 : :
61 : : /// the modifiedColorPrimitive stack
62 : : basegfx::BColorModifierStack maBColorModifierStack;
63 : :
64 : : /* as tooling, the process() implementation takes over API handling and calls this
65 : : virtual render method when the primitive implementation is BasePrimitive3D-based.
66 : : */
67 : : virtual void processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate);
68 : :
69 : : public:
70 : : Geometry2DExtractingProcessor(
71 : : const geometry::ViewInformation3D& rViewInformation,
72 : : const basegfx::B2DHomMatrix& rObjectTransformation);
73 : :
74 : : // data read access
75 : 0 : const primitive2d::Primitive2DSequence& getPrimitive2DSequence() const { return maPrimitive2DSequence; }
76 : 0 : const basegfx::B2DHomMatrix& getObjectTransformation() const { return maObjectTransformation; }
77 : : const basegfx::BColorModifierStack& getBColorModifierStack() const { return maBColorModifierStack; }
78 : : };
79 : : } // end of namespace processor3d
80 : : } // end of namespace drawinglayer
81 : :
82 : : #endif //INCLUDED_DRAWINGLAYER_PROCESSOR3D_GEOMETRY2DEXTRACTOR_HXX
83 : :
84 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|