13334a7e6SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
33334a7e6SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
43334a7e6SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
53334a7e6SAndrew Rist  * distributed with this work for additional information
63334a7e6SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
73334a7e6SAndrew Rist  * to you under the Apache License, Version 2.0 (the
83334a7e6SAndrew Rist  * "License"); you may not use this file except in compliance
93334a7e6SAndrew Rist  * with the License.  You may obtain a copy of the License at
103334a7e6SAndrew Rist  *
113334a7e6SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
123334a7e6SAndrew Rist  *
133334a7e6SAndrew Rist  * Unless required by applicable law or agreed to in writing,
143334a7e6SAndrew Rist  * software distributed under the License is distributed on an
153334a7e6SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
163334a7e6SAndrew Rist  * KIND, either express or implied.  See the License for the
173334a7e6SAndrew Rist  * specific language governing permissions and limitations
183334a7e6SAndrew Rist  * under the License.
193334a7e6SAndrew Rist  *
203334a7e6SAndrew Rist  *************************************************************/
213334a7e6SAndrew Rist 
223334a7e6SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef _SDR_OVERLAY_OVERLAYBITMAPEX_HXX
25cdf0e10cSrcweir #define _SDR_OVERLAY_OVERLAYBITMAPEX_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <svx/sdr/overlay/overlayobject.hxx>
28cdf0e10cSrcweir #include <vcl/bitmapex.hxx>
29cdf0e10cSrcweir 
30cdf0e10cSrcweir //////////////////////////////////////////////////////////////////////////////
31cdf0e10cSrcweir 
32cdf0e10cSrcweir namespace sdr
33cdf0e10cSrcweir {
34cdf0e10cSrcweir 	namespace overlay
35cdf0e10cSrcweir 	{
36cdf0e10cSrcweir 		class SVX_DLLPUBLIC OverlayBitmapEx : public OverlayObjectWithBasePosition
37cdf0e10cSrcweir 		{
38cdf0e10cSrcweir 		protected:
39cdf0e10cSrcweir 			// the Bitmap itself
40cdf0e10cSrcweir 			BitmapEx								maBitmapEx;
41cdf0e10cSrcweir 
42cdf0e10cSrcweir 			// position of the basePosition inside the Bitmap, in pixels
43cdf0e10cSrcweir 			sal_uInt16								mnCenterX;
44cdf0e10cSrcweir 			sal_uInt16								mnCenterY;
45*414a0e15SArmin Le Grand 
46*414a0e15SArmin Le Grand             // optional transparency, shear and rotation
47*414a0e15SArmin Le Grand             double                                  mfAlpha;
48*414a0e15SArmin Le Grand             double                                  mfShearX;
49*414a0e15SArmin Le Grand             double                                  mfRotation;
50cdf0e10cSrcweir 
51cdf0e10cSrcweir 			virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
52cdf0e10cSrcweir 
53cdf0e10cSrcweir 		public:
54cdf0e10cSrcweir 			OverlayBitmapEx(
55cdf0e10cSrcweir 				const basegfx::B2DPoint& rBasePos,
56cdf0e10cSrcweir 				const BitmapEx& rBitmapEx,
57*414a0e15SArmin Le Grand 				sal_uInt16 nCenX = 0,
58*414a0e15SArmin Le Grand                 sal_uInt16 nCenY = 0,
59*414a0e15SArmin Le Grand                 double fAlpha = 0.0,
60*414a0e15SArmin Le Grand                 double fShearX = 0.0,
61*414a0e15SArmin Le Grand                 double fRotation = 0.0);
62cdf0e10cSrcweir 			virtual ~OverlayBitmapEx();
63cdf0e10cSrcweir 
getBitmapEx() const64cdf0e10cSrcweir 			const BitmapEx& getBitmapEx() const { return maBitmapEx; }
65cdf0e10cSrcweir 			void setBitmapEx(const BitmapEx& rNew);
66cdf0e10cSrcweir 
getCenterX() const67cdf0e10cSrcweir 			sal_uInt16 getCenterX() const { return mnCenterX; }
getCenterY() const68cdf0e10cSrcweir 			sal_uInt16 getCenterY() const { return mnCenterY; }
69cdf0e10cSrcweir 			void setCenterXY(sal_uInt16 nNewX, sal_uInt16 nNewY);
70*414a0e15SArmin Le Grand 
71*414a0e15SArmin Le Grand             // get shearX and rotation
getShearX() const72*414a0e15SArmin Le Grand             double getShearX() const { return mfShearX; }
getRotation() const73*414a0e15SArmin Le Grand             double getRotation() const { return mfRotation; }
74cdf0e10cSrcweir 		};
75cdf0e10cSrcweir 	} // end of namespace overlay
76cdf0e10cSrcweir } // end of namespace sdr
77cdf0e10cSrcweir 
78cdf0e10cSrcweir //////////////////////////////////////////////////////////////////////////////
79cdf0e10cSrcweir 
80cdf0e10cSrcweir #endif //_SDR_OVERLAY_OVERLAYBITMAPEX_HXX
81cdf0e10cSrcweir 
82cdf0e10cSrcweir // eof
83