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