update emoji autocorrect entries from po-files
[LibreOffice.git] / include / drawinglayer / texture / texture3d.hxx
blob9a033c7422f400928338d5ed79b7f7da1ba33198
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_TEXTURE_TEXTURE3D_HXX
21 #define INCLUDED_DRAWINGLAYER_TEXTURE_TEXTURE3D_HXX
23 #include <drawinglayer/drawinglayerdllapi.h>
25 #include <drawinglayer/texture/texture.hxx>
26 #include <vcl/bitmapex.hxx>
28 namespace drawinglayer { namespace primitive3d {
29 class HatchTexturePrimitive3D;
32 namespace drawinglayer
34 namespace texture
36 class DRAWINGLAYER_DLLPUBLIC GeoTexSvxMono : public GeoTexSvx
38 protected:
39 basegfx::BColor maSingleColor;
40 double mfOpacity;
42 public:
43 GeoTexSvxMono(
44 const basegfx::BColor& rSingleColor,
45 double fOpacity);
47 // compare operator
48 virtual bool operator==(const GeoTexSvx& rGeoTexSvx) const SAL_OVERRIDE;
49 virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const SAL_OVERRIDE;
50 virtual void modifyOpacity(const basegfx::B2DPoint& rUV, double& rfOpacity) const SAL_OVERRIDE;
52 } // end of namespace texture
53 } // end of namespace drawinglayer
55 namespace drawinglayer
57 namespace texture
59 class DRAWINGLAYER_DLLPUBLIC GeoTexSvxBitmapEx : public GeoTexSvx
61 protected:
62 BitmapEx maBitmapEx;
63 BitmapReadAccess* mpReadBitmap;
64 Bitmap maTransparence;
65 BitmapReadAccess* mpReadTransparence;
66 basegfx::B2DPoint maTopLeft;
67 basegfx::B2DVector maSize;
68 double mfMulX;
69 double mfMulY;
71 /// bitfield
72 bool mbIsAlpha : 1;
73 bool mbIsTransparent : 1;
75 // helpers
76 bool impIsValid(const basegfx::B2DPoint& rUV, sal_Int32& rX, sal_Int32& rY) const;
77 sal_uInt8 impGetTransparence(sal_Int32& rX, sal_Int32& rY) const;
79 public:
80 GeoTexSvxBitmapEx(
81 const BitmapEx& rBitmapEx,
82 const basegfx::B2DRange& rRange);
83 virtual ~GeoTexSvxBitmapEx();
85 virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const SAL_OVERRIDE;
86 virtual void modifyOpacity(const basegfx::B2DPoint& rUV, double& rfOpacity) const SAL_OVERRIDE;
88 } // end of namespace texture
89 } // end of namespace drawinglayer
91 namespace drawinglayer
93 namespace texture
95 class DRAWINGLAYER_DLLPUBLIC GeoTexSvxBitmapExTiled : public GeoTexSvxBitmapEx
97 protected:
98 double mfOffsetX;
99 double mfOffsetY;
101 /// bitfield
102 bool mbUseOffsetX : 1;
103 bool mbUseOffsetY : 1;
105 // helpers
106 basegfx::B2DPoint impGetCorrected(const basegfx::B2DPoint& rUV) const;
108 public:
109 GeoTexSvxBitmapExTiled(
110 const BitmapEx& rBitmapEx,
111 const basegfx::B2DRange& rRange,
112 double fOffsetX = 0.0,
113 double fOffsetY = 0.0);
115 virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const SAL_OVERRIDE;
116 virtual void modifyOpacity(const basegfx::B2DPoint& rUV, double& rfOpacity) const SAL_OVERRIDE;
118 } // end of namespace texture
119 } // end of namespace drawinglayer
121 namespace drawinglayer
123 namespace texture
125 class DRAWINGLAYER_DLLPUBLIC GeoTexSvxMultiHatch : public GeoTexSvx
127 protected:
128 basegfx::BColor maColor;
129 double mfLogicPixelSize;
130 GeoTexSvxHatch* mp0;
131 GeoTexSvxHatch* mp1;
132 GeoTexSvxHatch* mp2;
134 // bitfield
135 bool mbFillBackground : 1;
137 // helpers
138 bool impIsOnHatch(const basegfx::B2DPoint& rUV) const;
140 public:
141 GeoTexSvxMultiHatch(const primitive3d::HatchTexturePrimitive3D& rPrimitive, double fLogicPixelSize);
142 virtual ~GeoTexSvxMultiHatch();
143 virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const SAL_OVERRIDE;
144 virtual void modifyOpacity(const basegfx::B2DPoint& rUV, double& rfOpacity) const SAL_OVERRIDE;
146 // dada access
147 bool getFillBackground() const { return mbFillBackground; }
149 } // end of namespace texture
150 } // end of namespace drawinglayer
152 #endif // INCLUDED_DRAWINGLAYER_TEXTURE_TEXTURE3D_HXX
154 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */