update emoji autocorrect entries from po-files
[LibreOffice.git] / include / drawinglayer / primitive2d / transformprimitive2d.hxx
blobefc9fa318e7f0ace36e345fc6795b342101d7417
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
20 #ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_TRANSFORMPRIMITIVE2D_HXX
21 #define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_TRANSFORMPRIMITIVE2D_HXX
23 #include <drawinglayer/drawinglayerdllapi.h>
25 #include <drawinglayer/primitive2d/groupprimitive2d.hxx>
26 #include <basegfx/matrix/b2dhommatrix.hxx>
30 namespace drawinglayer
32 namespace primitive2d
34 /** TransformPrimitive2D class
36 This is one of the basic grouping primitives and it provides
37 embedding a sequence of primitives (a geometry) into a
38 transformation. All renderers have to handle this, usually by
39 building a current transformation stack (linear combination)
40 and applying this to all to-be-rendered geometry. If not handling
41 this, the output will be mostly wrong since this primitive is
42 widely used.
44 It does transform by embedding an existing geometry into a
45 transformation as Child-content. This allows re-usage of the
46 refcounted Uno-Api primitives and their existung, buffered
47 decompositions.
49 It could e.g. be used to show a single object geometry in 1000
50 different, transformed states without the need to create those
51 thousand primitive contents.
53 class DRAWINGLAYER_DLLPUBLIC TransformPrimitive2D : public GroupPrimitive2D
55 private:
56 // the transformation to apply to the child geometry
57 basegfx::B2DHomMatrix maTransformation;
59 public:
60 /// constructor
61 TransformPrimitive2D(
62 const basegfx::B2DHomMatrix& rTransformation,
63 const Primitive2DSequence& rChildren);
65 /// data read access
66 const basegfx::B2DHomMatrix& getTransformation() const { return maTransformation; }
68 /// compare operator
69 virtual bool operator==(const BasePrimitive2D& rPrimitive) const SAL_OVERRIDE;
71 /// get range
72 virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const SAL_OVERRIDE;
74 /// provide unique ID
75 DeclPrimitive2DIDBlock()
77 } // end of namespace primitive2d
78 } // end of namespace drawinglayer
82 #endif //INCLUDED_DRAWINGLAYER_PRIMITIVE2D_TRANSFORMPRIMITIVE2D_HXX
84 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */