summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2014-01-27 17:14:55 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-01-28 14:30:45 +0000
commitfff58c3379ef03fb8dec51b7b64a053481d48727 (patch)
tree5dcf97979c042236e8caf8fe2cc6570b689dae54 /include
parent655397f53d1244b7df00c17487ff3717eb804507 (diff)
Resolves: #i123950# Corrected/extended interactive crop feature...
to work in all situations (cherry picked from commit a440c753532e9ae1747ef3b3ed990d8b713913da) Conflicts: include/svx/sdr/overlay/overlaybitmapex.hxx svx/source/svdraw/svddrgm1.hxx svx/source/svdraw/svddrgmt.cxx svx/source/svdraw/svdmrkv.cxx svx/source/svdraw/svdograf.cxx Change-Id: I33601a429657965fcc9b18da85aa5ffabad65983
Diffstat (limited to 'include')
-rw-r--r--include/svx/sdr/overlay/overlayanimatedbitmapex.hxx12
-rw-r--r--include/svx/sdr/overlay/overlaybitmapex.hxx16
-rw-r--r--include/svx/sdr/overlay/overlaytools.hxx10
-rw-r--r--include/svx/svdhdl.hxx20
-rw-r--r--include/svx/svdograf.hxx3
5 files changed, 48 insertions, 13 deletions
diff --git a/include/svx/sdr/overlay/overlayanimatedbitmapex.hxx b/include/svx/sdr/overlay/overlayanimatedbitmapex.hxx
index e895bfb71c15..5182f93a8f48 100644
--- a/include/svx/sdr/overlay/overlayanimatedbitmapex.hxx
+++ b/include/svx/sdr/overlay/overlayanimatedbitmapex.hxx
@@ -45,6 +45,10 @@ namespace sdr
// #i53216# added CursorBlinkTime (in ms)
sal_uInt32 mnBlinkTime;
+ // optional shear and rotation
+ double mfShearX;
+ double mfRotation;
+
/// bitfield
// Flag to remember which state to draw. Inited with false (0)
bool mbOverlayState : 1;
@@ -61,7 +65,9 @@ namespace sdr
sal_uInt16 nCenX1 = 0,
sal_uInt16 nCenY1 = 0,
sal_uInt16 nCenX2 = 0,
- sal_uInt16 nCenY2 = 0);
+ sal_uInt16 nCenY2 = 0,
+ double fShearX = 0.0,
+ double fRotation = 0.0);
virtual ~OverlayAnimatedBitmapEx();
const BitmapEx& getBitmapEx1() const { return maBitmapEx1; }
@@ -78,6 +84,10 @@ namespace sdr
// 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);
+
+ // get shearX and rotation
+ double getShearX() const { return mfShearX; }
+ double getRotation() const { return mfRotation; }
};
} // end of namespace overlay
} // end of namespace sdr
diff --git a/include/svx/sdr/overlay/overlaybitmapex.hxx b/include/svx/sdr/overlay/overlaybitmapex.hxx
index 045c9645f8a0..c984c3093345 100644
--- a/include/svx/sdr/overlay/overlaybitmapex.hxx
+++ b/include/svx/sdr/overlay/overlaybitmapex.hxx
@@ -39,8 +39,10 @@ namespace sdr
sal_uInt16 mnCenterX;
sal_uInt16 mnCenterY;
- // optional transparency
- double mfAlpha;
+ // optional transparency, shear and rotation
+ double mfAlpha;
+ double mfShearX;
+ double mfRotation;
virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
@@ -48,13 +50,21 @@ namespace sdr
OverlayBitmapEx(
const basegfx::B2DPoint& rBasePos,
const BitmapEx& rBitmapEx,
- sal_uInt16 nCenX = 0, sal_uInt16 nCenY = 0, double fAlpha = 0.0 );
+ sal_uInt16 nCenX = 0,
+ sal_uInt16 nCenY = 0,
+ double fAlpha = 0.0,
+ double fShearX = 0.0,
+ double fRotation = 0.0);
virtual ~OverlayBitmapEx();
const BitmapEx& getBitmapEx() const { return maBitmapEx; }
sal_uInt16 getCenterX() const { return mnCenterX; }
sal_uInt16 getCenterY() const { return mnCenterY; }
+
+ // get shearX and rotation
+ double getShearX() const { return mfShearX; }
+ double getRotation() const { return mfRotation; }
};
} // end of namespace overlay
} // end of namespace sdr
diff --git a/include/svx/sdr/overlay/overlaytools.hxx b/include/svx/sdr/overlay/overlaytools.hxx
index f57d6a8a52bf..181f8950db9f 100644
--- a/include/svx/sdr/overlay/overlaytools.hxx
+++ b/include/svx/sdr/overlay/overlaytools.hxx
@@ -46,6 +46,10 @@ namespace drawinglayer
sal_uInt16 mnCenterX;
sal_uInt16 mnCenterY;
+ // evtl. rotation and shear around center
+ double mfShearX;
+ double mfRotation;
+
protected:
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
@@ -54,13 +58,17 @@ namespace drawinglayer
const BitmapEx& rBitmapEx,
const basegfx::B2DPoint& rBasePosition,
sal_uInt16 nCenterX,
- sal_uInt16 nCenterY);
+ sal_uInt16 nCenterY,
+ double fShearX = 0.0,
+ double fRotation = 0.0);
// data access
const BitmapEx& getBitmapEx() const { return maBitmapEx; }
const basegfx::B2DPoint& getBasePosition() const { return maBasePosition; }
sal_uInt16 getCenterX() const { return mnCenterX; }
sal_uInt16 getCenterY() const { return mnCenterY; }
+ double getShearX() const { return mfShearX; }
+ double getRotation() const { return mfRotation; }
// compare operator
virtual bool operator==( const BasePrimitive2D& rPrimitive ) const;
diff --git a/include/svx/svdhdl.hxx b/include/svx/svdhdl.hxx
index 599ff9f3232c..fc7382d417a9 100644
--- a/include/svx/svdhdl.hxx
+++ b/include/svx/svdhdl.hxx
@@ -502,8 +502,18 @@ public:
class SVX_DLLPUBLIC SdrCropHdl : public SdrHdl
{
+private:
+ // evtl. shear and rotation, equal to the object's one to allow adaption of
+ // the visualization handles
+ double mfShearX;
+ double mfRotation;
+
public:
- SdrCropHdl(const Point& rPnt, SdrHdlKind eNewKind);
+ SdrCropHdl(
+ const Point& rPnt,
+ SdrHdlKind eNewKind,
+ double fShearX,
+ double fRotation);
protected:
// create marker for this kind
@@ -526,11 +536,6 @@ private:
double mfCropRight;
double mfCropBottom;
- // Argh! The old geometry stuff expresses Y-Mirror using 180 degree rotaton
- // and the bMirrored bool at the SdrGrafObj, so for now I have to give
- // this info here. I am sooo looking forward to aw080 and real transformations :-(
- bool mbExtraMirrorXFromGraphic;
-
public:
SdrCropViewHdl(
const basegfx::B2DHomMatrix& rObjectTransform,
@@ -538,8 +543,7 @@ public:
double fCropLeft,
double fCropTop,
double fCropRight,
- double fCropBottom,
- bool bExtraMirrorXFromGraphic);
+ double fCropBottom);
protected:
// create marker for this kind
diff --git a/include/svx/svdograf.hxx b/include/svx/svdograf.hxx
index 20151dde4a9a..eab2bf82d81c 100644
--- a/include/svx/svdograf.hxx
+++ b/include/svx/svdograf.hxx
@@ -197,6 +197,9 @@ public:
// #i103116# FullDrag support
virtual SdrObject* getFullDragClone() const;
+
+ // add handles for crop mode when selected
+ void addCropHandles(SdrHdlList& rTarget) const;
};
#endif // INCLUDED_SVX_SVDOGRAF_HXX