LibreOffice Module drawinglayer (master) 1
baseprocessor2d.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#ifndef INCLUDED_DRAWINGLAYER_PROCESSOR2D_BASEPROCESSOR2D_HXX
21#define INCLUDED_DRAWINGLAYER_PROCESSOR2D_BASEPROCESSOR2D_HXX
22
24
28
29
31 {
155 {
156 private:
159
160 protected:
161 /* access method to allow the implementations to change the current
162 ViewInformation2D if needed. This allows isolating these accesses
163 later if needed
164 */
166 {
167 maViewInformation2D = rViewInformation2D;
168 }
169
170 /* as tooling, the process() implementation takes over API handling and calls this
171 virtual render method when the primitive implementation is BasePrimitive2D-based.
172 Default implementation does nothing
173 */
174 virtual void processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate);
175
176 void process(const primitive2d::BasePrimitive2D& rCandidate);
177
178 // Primitive2DDecompositionVisitor
179 virtual void visit(const primitive2d::Primitive2DReference&) override final;
180 virtual void visit(const primitive2d::Primitive2DContainer&) override final;
181 virtual void visit(primitive2d::Primitive2DContainer&&) override final;
182
183 public:
185 explicit BaseProcessor2D(geometry::ViewInformation2D aViewInformation);
186 virtual ~BaseProcessor2D();
187
189 void process(const primitive2d::Primitive2DContainer& rSource);
190
192 const geometry::ViewInformation2D& getViewInformation2D() const { return maViewInformation2D; }
193 };
194
195} // end of namespace drawinglayer::processor2d
196
197
198#endif //INCLUDED_DRAWINGLAYER_PROCESSOR2D_BASEPROCESSOR2D_HXX
199
200/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
geometry::ViewInformation2D maViewInformation2D
The ViewInformation2D itself. It's private to isolate accesses to it.
void updateViewInformation(const geometry::ViewInformation2D &rViewInformation2D)
#define DRAWINGLAYER_DLLPUBLIC