update emoji autocorrect entries from po-files
[LibreOffice.git] / include / drawinglayer / primitive2d / markerarrayprimitive2d.hxx
blob92dab7cb070a239ef614889883f562a958f6456f
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_MARKERARRAYPRIMITIVE2D_HXX
21 #define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_MARKERARRAYPRIMITIVE2D_HXX
23 #include <drawinglayer/drawinglayerdllapi.h>
25 #include <drawinglayer/primitive2d/baseprimitive2d.hxx>
26 #include <basegfx/color/bcolor.hxx>
27 #include <vcl/bitmapex.hxx>
30 // MarkerArrayPrimitive2D class
32 namespace drawinglayer
34 namespace primitive2d
36 /** MarkerArrayPrimitive2D class
38 This primtive defines an array of markers. Their size is defined
39 in pixels and independent from the view transformation which makes
40 this primitive highly view-dependent. It is also transformation
41 invariant, so that the bitmap is always visualized unscaled and
42 unrotated.
43 It is used e.g. for grid position visualisation. The given Bitmap
44 (with transparence) is defined to be visible centered at each of the given
45 positions.
46 It decomposes to the needed number of BitmapPrimitive2D's, so it would
47 be efficient to handle it directly in a renderer.
49 class DRAWINGLAYER_DLLPUBLIC MarkerArrayPrimitive2D : public BufferedDecompositionPrimitive2D
51 private:
52 /// the positions for the marker
53 std::vector< basegfx::B2DPoint > maPositions;
55 /// the marker definintion to visualize
56 BitmapEx maMarker;
58 protected:
59 /// create local decomposition
60 virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const SAL_OVERRIDE;
62 public:
63 /// constructor
64 MarkerArrayPrimitive2D(
65 const std::vector< basegfx::B2DPoint >& rPositions,
66 const BitmapEx& rMarker);
68 /// data read access
69 const std::vector< basegfx::B2DPoint >& getPositions() const { return maPositions; }
70 const BitmapEx& getMarker() const { return maMarker; }
72 /// compare operator
73 virtual bool operator==(const BasePrimitive2D& rPrimitive) const SAL_OVERRIDE;
75 /// get range
76 virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const SAL_OVERRIDE;
78 /// provide unique ID
79 DeclPrimitive2DIDBlock()
81 } // end of namespace primitive2d
82 } // end of namespace drawinglayer
86 #endif //INCLUDED_DRAWINGLAYER_PRIMITIVE2D_MARKERARRAYPRIMITIVE2D_HXX
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */