LibreOffice Module drawinglayer (master) 1
gridprimitive2d.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#pragma once
21
23
27#include <vcl/bitmapex.hxx>
28
29
30// GridPrimitive2D class
31
33{
44 {
45 private:
48
50 double mfWidth;
51 double mfHeight;
54 sal_uInt32 mnSubdivisionsX;
55 sal_uInt32 mnSubdivisionsY;
56
59
62
68
70 virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override;
71
72 public:
75 basegfx::B2DHomMatrix aTransform,
76 double fWidth,
77 double fHeight,
78 double fSmallestViewDistance,
79 double fSmallestSubdivisionViewDistance,
80 sal_uInt32 nSubdivisionsX,
81 sal_uInt32 nSubdivisionsY,
82 const basegfx::BColor& rBColor,
83 const BitmapEx& rCrossMarker);
84
87 double getWidth() const { return mfWidth; }
88 double getHeight() const { return mfHeight; }
89 double getSmallestViewDistance() const { return mfSmallestViewDistance; }
90 double getSmallestSubdivisionViewDistance() const { return mfSmallestSubdivisionViewDistance; }
91 sal_uInt32 getSubdivisionsX() const { return mnSubdivisionsX; }
92 sal_uInt32 getSubdivisionsY() const { return mnSubdivisionsY; }
93 const basegfx::BColor& getBColor() const { return maBColor; }
94 const BitmapEx& getCrossMarker() const { return maCrossMarker; }
95
97 virtual bool operator==(const BasePrimitive2D& rPrimitive) const override;
98
100 virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const override;
101
103 virtual sal_uInt32 getPrimitive2DID() const override;
104
106 virtual void get2DDecomposition(Primitive2DDecompositionVisitor& rVisitor, const geometry::ViewInformation2D& rViewInformation) const override;
107 };
108} // end of namespace drawinglayer::primitive2d
109
110
111/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const basegfx::BColor & getBColor() const
basegfx::B2DHomMatrix maLastObjectToViewTransformation
the last used object to view transformtion and the last Viewport, used from getDecomposition for deci...
basegfx::BColor maBColor
Grid color for single-pixel grid points.
BitmapEx maCrossMarker
The Bitmap (with transparence) for grid cross points.
double mfWidth
grid layout definitions
basegfx::B2DHomMatrix maTransform
The geometry definition for the grid area.
const basegfx::B2DHomMatrix & getTransform() const
data read access
#define DRAWINGLAYER_DLLPUBLIC
basegfx::B2DHomMatrix maTransform
the geometric definition
bool operator==(const XclFontData &rLeft, const XclFontData &rRight)