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_BITMAPPRIMITIVE2D_HXX
30 : : #define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_BITMAPPRIMITIVE2D_HXX
31 : :
32 : : #include <drawinglayer/drawinglayerdllapi.h>
33 : :
34 : : #include <drawinglayer/primitive2d/baseprimitive2d.hxx>
35 : : #include <vcl/bitmapex.hxx>
36 : : #include <basegfx/matrix/b2dhommatrix.hxx>
37 : :
38 : : //////////////////////////////////////////////////////////////////////////////
39 : : // BitmapPrimitive2D class
40 : :
41 : : namespace drawinglayer
42 : : {
43 : : namespace primitive2d
44 : : {
45 : : /** BitmapPrimitive2D class
46 : :
47 : : This class is the central primitive for Bitmap-based primitives.
48 : : It provides RGBA-based bitmaps, currently using a BitmapEx from VCL.
49 : : This may change in the future to any other, maybe more general base
50 : : class providing 24bit RGBA.
51 : : */
52 [ + - ][ + - ]: 14568 : class DRAWINGLAYER_DLLPUBLIC BitmapPrimitive2D : public BasePrimitive2D
[ - + ]
53 : : {
54 : : private:
55 : : /// the RGBA Bitmap-data
56 : : BitmapEx maBitmapEx;
57 : :
58 : : /** the object transformation from unit coordinates, defining
59 : : size, shear, rotate and position
60 : : */
61 : : basegfx::B2DHomMatrix maTransform;
62 : :
63 : : public:
64 : : /// constructor
65 : : BitmapPrimitive2D(
66 : : const BitmapEx& rBitmapEx,
67 : : const basegfx::B2DHomMatrix& rTransform);
68 : :
69 : : /// data read access
70 : 17557 : const BitmapEx& getBitmapEx() const { return maBitmapEx; }
71 : 17557 : const basegfx::B2DHomMatrix& getTransform() const { return maTransform; }
72 : :
73 : : /// compare operator
74 : : virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
75 : :
76 : : /// get range
77 : : virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
78 : :
79 : : /// provide unique ID
80 : : DeclPrimitrive2DIDBlock()
81 : : };
82 : : } // end of namespace primitive2d
83 : : } // end of namespace drawinglayer
84 : :
85 : : //////////////////////////////////////////////////////////////////////////////
86 : :
87 : : #endif // INCLUDED_DRAWINGLAYER_PRIMITIVE2D_BITMAPPRIMITIVE2D_HXX
88 : :
89 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|