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_OVERLAYRECTANGLE_HXX 25 #define _SDR_OVERLAY_OVERLAYRECTANGLE_HXX 26 27 #include <svx/sdr/overlay/overlayobject.hxx> 28 #include <tools/gen.hxx> 29 30 ////////////////////////////////////////////////////////////////////////////// 31 32 class PolyPolygon; 33 34 namespace sdr 35 { 36 namespace overlay 37 { 38 class OverlayRectangle : public OverlayObjectWithBasePosition 39 { 40 // geometric definitions 41 basegfx::B2DPoint maSecondPosition; 42 const double mfTransparence; 43 const double mfDiscreteGrow; 44 const double mfDiscreteShrink; 45 const double mfRotation; 46 47 // #i53216# added CursorBlinkTime (in ms) 48 sal_uInt32 mnBlinkTime; 49 50 /// bitfield 51 // Flag to remember which state to draw. Inited with false (0) 52 bool mbOverlayState : 1; 53 54 // geometry creation for OverlayObject 55 virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence(); 56 57 public: 58 OverlayRectangle( 59 const basegfx::B2DPoint& rBasePosition, 60 const basegfx::B2DPoint& rSecondPosition, 61 const Color& rHatchColor, 62 double fTransparence, 63 double fDiscreteGrow, 64 double fDiscreteShrink, 65 double fRotation, 66 sal_uInt32 nBlinkTime, 67 bool bAnimate); 68 getSecondPosition() const69 const basegfx::B2DPoint& getSecondPosition() const { return maSecondPosition; } 70 void setSecondPosition(const basegfx::B2DPoint&); 71 72 // data read access getTransparence() const73 double getTransparence() const { return mfTransparence; } getDiscreteGrow() const74 double getDiscreteGrow() const { return mfDiscreteGrow; } getDiscreteShrink() const75 double getDiscreteShrink() const { return mfDiscreteShrink; } getRotation() const76 double getRotation() const { return mfRotation; } 77 78 // added CursorBlinkTime (in ms) getBlinkTime() const79 sal_uInt32 getBlinkTime() const { return mnBlinkTime; } 80 void setBlinkTime(sal_uInt32 nNew); 81 82 // execute event from base class ::sdr::animation::Event. Default 83 // implementation does nothing and does not create a new event. 84 virtual void Trigger(sal_uInt32 nTime); 85 }; 86 } // end of namespace overlay 87 } // end of namespace sdr 88 89 ////////////////////////////////////////////////////////////////////////////// 90 91 #endif //_SDR_OVERLAY_OVERLAYRECTANGLE_HXX 92 93 // eof 94