1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
22 #include <drawinglayer/processor3d/baseprocessor3d.hxx>
23 #include <drawinglayer/primitive2d/Primitive2DContainer.hxx>
24 #include <basegfx/matrix/b2dhommatrix.hxx>
25 #include <basegfx/color/bcolormodifier.hxx>
28 namespace drawinglayer::processor3d
30 /** Geometry2DExtractingProcessor class
32 This processor extracts the 2D geometry (projected geometry) of all fed primitives.
33 It is e.g. used as sub-processor for contour extraction where 3D geometry is only
34 useful as 2D projected geometry.
36 class Geometry2DExtractingProcessor final
: public BaseProcessor3D
39 /// result holding vector (2D)
40 primitive2d::Primitive2DContainer maPrimitive2DSequence
;
42 /// object transformation for scene for 2d definition
43 basegfx::B2DHomMatrix maObjectTransformation
;
45 /// the modifiedColorPrimitive stack
46 basegfx::BColorModifierStack maBColorModifierStack
;
48 /* as tooling, the process() implementation takes over API handling and calls this
49 virtual render method when the primitive implementation is BasePrimitive3D-based.
51 virtual void processBasePrimitive3D(const primitive3d::BasePrimitive3D
& rCandidate
) override
;
54 Geometry2DExtractingProcessor(
55 const geometry::ViewInformation3D
& rViewInformation
,
56 const basegfx::B2DHomMatrix
& rObjectTransformation
);
59 const primitive2d::Primitive2DContainer
& getPrimitive2DSequence() const { return maPrimitive2DSequence
; }
60 const basegfx::B2DHomMatrix
& getObjectTransformation() const { return maObjectTransformation
; }
63 } // end of namespace drawinglayer::processor3d
66 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */