Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : : #ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_WRONGSPELLPRIMITIVE2D_HXX
30 : : #define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_WRONGSPELLPRIMITIVE2D_HXX
31 : :
32 : : #include <drawinglayer/drawinglayerdllapi.h>
33 : :
34 : : #include <drawinglayer/primitive2d/baseprimitive2d.hxx>
35 : : #include <basegfx/color/bcolor.hxx>
36 : : #include <basegfx/matrix/b2dhommatrix.hxx>
37 : :
38 : : //////////////////////////////////////////////////////////////////////////////
39 : : // WrongSpellPrimitive2D class
40 : :
41 : : namespace drawinglayer
42 : : {
43 : : namespace primitive2d
44 : : {
45 : : /** WrongSpellPrimitive2D class
46 : :
47 : : This is a helper primitive to hold evtl. WrongSpell visualisations
48 : : in the sequence of primitives. The primitive holds this information
49 : : separated form the TextPortions to where it belongs to tot expand the
50 : : TextSimplePortionPrimitive2D more as needed.
51 : :
52 : : A renderer who does not want to visualize this (if contained at all)
53 : : can detect and ignore this primitive. If it's decomposition is used,
54 : : it will be visualized as red wavelines.
55 : :
56 : : The geometric definition defines a line on the X-Axis (no Y-coordinates)
57 : : which will when transformed by Transformation, create the coordinate data.
58 : : */
59 [ # # ][ # # ]: 0 : class DRAWINGLAYER_DLLPUBLIC WrongSpellPrimitive2D : public BufferedDecompositionPrimitive2D
60 : : {
61 : : private:
62 : : /// geometry definition
63 : : basegfx::B2DHomMatrix maTransformation;
64 : : double mfStart;
65 : : double mfStop;
66 : :
67 : : /// color (usually red)
68 : : basegfx::BColor maColor;
69 : :
70 : : protected:
71 : : /// create local decomposition
72 : : virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
73 : :
74 : : public:
75 : : /// constructor
76 : : WrongSpellPrimitive2D(
77 : : const basegfx::B2DHomMatrix& rTransformation,
78 : : double fStart,
79 : : double fStop,
80 : : const basegfx::BColor& rColor);
81 : :
82 : : /// data read access
83 : 0 : const basegfx::B2DHomMatrix& getTransformation() const { return maTransformation; }
84 : 0 : double getStart() const { return mfStart; }
85 : 0 : double getStop() const { return mfStop; }
86 : 0 : const basegfx::BColor& getColor() const { return maColor; }
87 : :
88 : : /// compare operator
89 : : virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
90 : :
91 : : /// provide unique ID
92 : : DeclPrimitrive2DIDBlock()
93 : : };
94 : : } // end of namespace primitive2d
95 : : } // end of namespace drawinglayer
96 : :
97 : : //////////////////////////////////////////////////////////////////////////////
98 : :
99 : : #endif //INCLUDED_DRAWINGLAYER_PRIMITIVE2D_WRONGSPELLPRIMITIVE2D_HXX
100 : :
101 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|