diff options
Diffstat (limited to 'include/svx/sdr/overlay')
-rw-r--r-- | include/svx/sdr/overlay/overlayanimatedbitmapex.hxx | 9 | ||||
-rw-r--r-- | include/svx/sdr/overlay/overlayobject.hxx | 3 | ||||
-rw-r--r-- | include/svx/sdr/overlay/overlaypolypolygon.hxx | 13 | ||||
-rw-r--r-- | include/svx/sdr/overlay/overlayrectangle.hxx | 87 | ||||
-rw-r--r-- | include/svx/sdr/overlay/overlaytools.hxx | 21 |
5 files changed, 110 insertions, 23 deletions
diff --git a/include/svx/sdr/overlay/overlayanimatedbitmapex.hxx b/include/svx/sdr/overlay/overlayanimatedbitmapex.hxx index 756d2dac3731..ee9a4a66017c 100644 --- a/include/svx/sdr/overlay/overlayanimatedbitmapex.hxx +++ b/include/svx/sdr/overlay/overlayanimatedbitmapex.hxx @@ -45,16 +45,13 @@ namespace sdr // #i53216# added CursorBlinkTime (in ms) sal_uInt32 mnBlinkTime; - // bitfield - // Flag to remember which state to draw. Inited with sal_False (0) - unsigned mbOverlayState : 1; + /// bitfield + // Flag to remember which state to draw. Inited with false (0) + bool mbOverlayState : 1; // geometry creation for OverlayObject virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence(); - // #i53216# check blink time value range (currently 25 < mnBlinkTime < 10000) - void impCheckBlinkTimeValueRange(); - public: OverlayAnimatedBitmapEx( const basegfx::B2DPoint& rBasePos, diff --git a/include/svx/sdr/overlay/overlayobject.hxx b/include/svx/sdr/overlay/overlayobject.hxx index 263e9a9ab57c..3b56c97556ed 100644 --- a/include/svx/sdr/overlay/overlayobject.hxx +++ b/include/svx/sdr/overlay/overlayobject.hxx @@ -82,6 +82,9 @@ namespace sdr // a missing implementation virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence(); + // #i53216# check blink time value range (currently 25 < mnBlinkTime < 10000) + sal_uInt32 impCheckBlinkTimeValueRange(sal_uInt32 nBlinkTime) const; + // region in logical coordinates basegfx::B2DRange maBaseRange; diff --git a/include/svx/sdr/overlay/overlaypolypolygon.hxx b/include/svx/sdr/overlay/overlaypolypolygon.hxx index d7dd82751f53..a716aac43069 100644 --- a/include/svx/sdr/overlay/overlaypolypolygon.hxx +++ b/include/svx/sdr/overlay/overlaypolypolygon.hxx @@ -22,6 +22,7 @@ #include <svx/sdr/overlay/overlayobject.hxx> #include <basegfx/polygon/b2dpolypolygon.hxx> +#include <basegfx/polygon/b2dpolygon.hxx> ////////////////////////////////////////////////////////////////////////////// @@ -29,21 +30,23 @@ namespace sdr { namespace overlay { - class SVX_DLLPUBLIC OverlayPolyPolygonStriped : public OverlayObject + class SVX_DLLPUBLIC OverlayPolyPolygonStripedAndFilled : public OverlayObject { protected: // geometry - basegfx::B2DPolyPolygon maPolyPolygon; + basegfx::B2DPolyPolygon maLinePolyPolygon; // geometry creation for OverlayObject virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence(); public: - explicit OverlayPolyPolygonStriped(const basegfx::B2DPolyPolygon& rPolyPolygon); - virtual ~OverlayPolyPolygonStriped(); + explicit OverlayPolyPolygonStripedAndFilled( + const basegfx::B2DPolyPolygon& rLinePolyPolygon); + virtual ~OverlayPolyPolygonStripedAndFilled(); // change geometry - basegfx::B2DPolyPolygon getPolyPolygon() const { return maPolyPolygon; } + basegfx::B2DPolyPolygon getLinePolyPolygon() const { return maLinePolyPolygon; } + void setLinePolyPolygon(const basegfx::B2DPolyPolygon& rNew); // react on stripe definition change virtual void stripeDefinitionHasChanged(); diff --git a/include/svx/sdr/overlay/overlayrectangle.hxx b/include/svx/sdr/overlay/overlayrectangle.hxx new file mode 100644 index 000000000000..3d2f6f708be5 --- /dev/null +++ b/include/svx/sdr/overlay/overlayrectangle.hxx @@ -0,0 +1,87 @@ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef _SDR_OVERLAY_OVERLAYRECTANGLE_HXX +#define _SDR_OVERLAY_OVERLAYRECTANGLE_HXX + +#include <svx/sdr/overlay/overlayobject.hxx> +#include <tools/gen.hxx> + +////////////////////////////////////////////////////////////////////////////// + +class PolyPolygon; + +namespace sdr +{ + namespace overlay + { + class OverlayRectangle : public OverlayObjectWithBasePosition + { + // geometric definitions + basegfx::B2DPoint maSecondPosition; + const double mfTransparence; + const double mfDiscreteGrow; + const double mfDiscreteShrink; + const double mfRotation; + + // #i53216# added CursorBlinkTime (in ms) + sal_uInt32 mnBlinkTime; + + /// bitfield + // Flag to remember which state to draw. Inited with false (0) + bool mbOverlayState : 1; + + // geometry creation for OverlayObject + virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence(); + + public: + OverlayRectangle( + const basegfx::B2DPoint& rBasePosition, + const basegfx::B2DPoint& rSecondPosition, + const Color& rHatchColor, + double fTransparence, + double fDiscreteGrow, + double fDiscreteShrink, + double fRotation, + sal_uInt32 nBlinkTime, + bool bAnimate); + + const basegfx::B2DPoint& getSecondPosition() const { return maSecondPosition; } + void setSecondPosition(const basegfx::B2DPoint&); + + // data read access + double getTransparence() const { return mfTransparence; } + double getDiscreteGrow() const { return mfDiscreteGrow; } + double getDiscreteShrink() const { return mfDiscreteShrink; } + double getRotation() const { return mfRotation; } + + // added CursorBlinkTime (in ms) + sal_uInt32 getBlinkTime() const { return mnBlinkTime; } + void setBlinkTime(sal_uInt32 nNew); + + // execute event from base class ::sdr::animation::Event. Default + // implementation does nothing and does not create a new event. + virtual void Trigger(sal_uInt32 nTime); + }; + } // end of namespace overlay +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_OVERLAY_OVERLAYRECTANGLE_HXX + +// eof diff --git a/include/svx/sdr/overlay/overlaytools.hxx b/include/svx/sdr/overlay/overlaytools.hxx index 408c81b40d01..57bbcf72ebdb 100644 --- a/include/svx/sdr/overlay/overlaytools.hxx +++ b/include/svx/sdr/overlay/overlaytools.hxx @@ -118,16 +118,15 @@ namespace drawinglayer { namespace primitive2d { - class OverlayHatchRectanglePrimitive : public DiscreteMetricDependentPrimitive2D + class OverlayRectanglePrimitive : public DiscreteMetricDependentPrimitive2D { private: // the logic rectangle definition basegfx::B2DRange maObjectRange; - // the hatch definition - double mfDiscreteHatchDistance; - double mfHatchRotation; - basegfx::BColor maHatchColor; + // the graphic definition + basegfx::BColor maColor; + double mfTransparence; // the dscrete grow and shrink of the box double mfDiscreteGrow; @@ -140,20 +139,18 @@ namespace drawinglayer virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: - OverlayHatchRectanglePrimitive( + OverlayRectanglePrimitive( const basegfx::B2DRange& rObjectRange, - double fDiscreteHatchDistance, - double fHatchRotation, - const basegfx::BColor& rHatchColor, + const basegfx::BColor& rColor, + double fTransparence, double fDiscreteGrow, double fDiscreteShrink, double fRotation); // data access const basegfx::B2DRange& getObjectRange() const { return maObjectRange; } - double getDiscreteHatchDistance() const { return mfDiscreteHatchDistance; } - double getHatchRotation() const { return mfHatchRotation; } - const basegfx::BColor& getHatchColor() const { return maHatchColor; } + const basegfx::BColor& getColor() const { return maColor; } + double getTransparence() const { return mfTransparence; } double getDiscreteGrow() const { return mfDiscreteGrow; } double getDiscreteShrink() const { return mfDiscreteShrink; } double getRotation() const { return mfRotation; } |