1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef _SDR_OVERLAY_OVERLAYBITMAPEX_HXX 29 #define _SDR_OVERLAY_OVERLAYBITMAPEX_HXX 30 31 #include <svx/sdr/overlay/overlayobject.hxx> 32 #include <vcl/bitmapex.hxx> 33 34 ////////////////////////////////////////////////////////////////////////////// 35 36 namespace sdr 37 { 38 namespace overlay 39 { 40 class SVX_DLLPUBLIC OverlayBitmapEx : public OverlayObjectWithBasePosition 41 { 42 protected: 43 // the Bitmap itself 44 BitmapEx maBitmapEx; 45 46 // position of the basePosition inside the Bitmap, in pixels 47 sal_uInt16 mnCenterX; 48 sal_uInt16 mnCenterY; 49 50 // optional transparency 51 double mfAlpha; 52 53 virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence(); 54 55 public: 56 OverlayBitmapEx( 57 const basegfx::B2DPoint& rBasePos, 58 const BitmapEx& rBitmapEx, 59 sal_uInt16 nCenX = 0, sal_uInt16 nCenY = 0, double fAlpha = 0.0 ); 60 virtual ~OverlayBitmapEx(); 61 62 const BitmapEx& getBitmapEx() const { return maBitmapEx; } 63 void setBitmapEx(const BitmapEx& rNew); 64 65 sal_uInt16 getCenterX() const { return mnCenterX; } 66 sal_uInt16 getCenterY() const { return mnCenterY; } 67 void setCenterXY(sal_uInt16 nNewX, sal_uInt16 nNewY); 68 }; 69 } // end of namespace overlay 70 } // end of namespace sdr 71 72 ////////////////////////////////////////////////////////////////////////////// 73 74 #endif //_SDR_OVERLAY_OVERLAYBITMAPEX_HXX 75 76 // eof 77