1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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
36 class DRAWINGLAYER_DLLPUBLIC GeoTexSvxMono
: public GeoTexSvx
39 basegfx::BColor maSingleColor
;
44 const basegfx::BColor
& rSingleColor
,
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
59 class DRAWINGLAYER_DLLPUBLIC GeoTexSvxBitmapEx
: public GeoTexSvx
63 BitmapReadAccess
* mpReadBitmap
;
64 Bitmap maTransparence
;
65 BitmapReadAccess
* mpReadTransparence
;
66 basegfx::B2DPoint maTopLeft
;
67 basegfx::B2DVector maSize
;
73 bool mbIsTransparent
: 1;
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;
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
95 class DRAWINGLAYER_DLLPUBLIC GeoTexSvxBitmapExTiled
: public GeoTexSvxBitmapEx
102 bool mbUseOffsetX
: 1;
103 bool mbUseOffsetY
: 1;
106 basegfx::B2DPoint
impGetCorrected(const basegfx::B2DPoint
& rUV
) const;
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
125 class DRAWINGLAYER_DLLPUBLIC GeoTexSvxMultiHatch
: public GeoTexSvx
128 basegfx::BColor maColor
;
129 double mfLogicPixelSize
;
135 bool mbFillBackground
: 1;
138 bool impIsOnHatch(const basegfx::B2DPoint
& rUV
) const;
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
;
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: */