summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2013-05-17 16:29:11 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-06-17 15:39:48 +0100
commit3a8dbb63197c5b9298015cbd5b15e607ec9a3705 (patch)
treed7edd0ed73a7d7ebafd449c924bd54ea0aad9065 /include
parentrestore now needed ctor (diff)
downloadcore-3a8dbb63197c5b9298015cbd5b15e607ec9a3705.tar.gz
core-3a8dbb63197c5b9298015cbd5b15e607ec9a3705.zip
Resolves: #i74211# Correct crop of bitmap data when...
logical size and MapMode do not match real pixel size (cherry picked from commit a24965371f7e881671182bc51432c08cbf667b56) Conflicts: svtools/inc/svtools/grfmgr.hxx svtools/source/graphic/grfmgr.cxx svx/inc/svx/svdhdl.hxx svx/inc/svx/svdograf.hxx svx/source/svdraw/svdhdl.cxx Change-Id: Icfb9091b55e50081e8daf697c9f00f5b5a10531a
Diffstat (limited to 'include')
-rw-r--r--include/svtools/grfmgr.hxx11
-rw-r--r--include/svx/svdhdl.hxx36
2 files changed, 47 insertions, 0 deletions
diff --git a/include/svtools/grfmgr.hxx b/include/svtools/grfmgr.hxx
index 9a3bd8c1d1ff..0523cc24d804 100644
--- a/include/svtools/grfmgr.hxx
+++ b/include/svtools/grfmgr.hxx
@@ -493,6 +493,17 @@ public:
// will cater for XNameContainer objects and deepinspect any containees
// if they exist
static void InspectForGraphicObjectImageURL( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rxIf, std::vector< OUString >& rvEmbedImgUrls );
+
+ // create CropScaling information
+ // fWidth, fHeight: object size
+ // f*Crop: crop values relative to original bitmap size
+ basegfx::B2DVector calculateCropScaling(
+ double fWidth,
+ double fHeight,
+ double fLeftCrop,
+ double fTopCrop,
+ double fRightCrop,
+ double fBottomCrop) const;
};
typedef ::std::vector< GraphicObject* > GraphicObjectList_impl;
diff --git a/include/svx/svdhdl.hxx b/include/svx/svdhdl.hxx
index 207b3f494967..ce8dad2712f1 100644
--- a/include/svx/svdhdl.hxx
+++ b/include/svx/svdhdl.hxx
@@ -28,6 +28,8 @@
#include <svx/xpoly.hxx>
#include <svx/svdoedge.hxx>
+#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <svx/sdgcpitm.hxx>
#include <svx/sdr/overlay/overlayobjectlist.hxx>
#include "svx/svxdllapi.h"
@@ -512,6 +514,40 @@ protected:
static BitmapEx GetHandlesBitmap();
};
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+class SVX_DLLPUBLIC SdrCropViewHdl : public SdrHdl
+{
+private:
+ basegfx::B2DHomMatrix maObjectTransform;
+ Graphic maGraphic;
+ double mfCropLeft;
+ double mfCropTop;
+ 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,
+ const Graphic& rGraphic,
+ double fCropLeft,
+ double fCropTop,
+ double fCropRight,
+ double fCropBottom,
+ bool bExtraMirrorXFromGraphic);
+
+protected:
+ // create marker for this kind
+ virtual void CreateB2dIAObject();
+};
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
#endif //_SVDHDL_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */