diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/svtools/grfmgr.hxx | 11 | ||||
-rw-r--r-- | include/svx/svdhdl.hxx | 36 |
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: */ |