diff options
author | Michael Meeks <michael.meeks@suse.com> | 2011-11-28 16:48:17 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2011-11-28 16:48:52 +0000 |
commit | 59df2942aec0fd8123b15799c6375abc83b9937e (patch) | |
tree | 9bfd775bd7b8ab768f012e82cb39c724ff3e0cf0 /svx/source | |
parent | 56a6704509bd24ac699d9ee9e4c430225f1b07cd (diff) |
correct gluepoint sizing to match new 9x9 glue-points (thanks to Astron)
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/svdraw/svdglue.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/svx/source/svdraw/svdglue.cxx b/svx/source/svdraw/svdglue.cxx index eac24300d6f4..69bd69cf064a 100644 --- a/svx/source/svdraw/svdglue.cxx +++ b/svx/source/svdraw/svdglue.cxx @@ -32,7 +32,7 @@ #include <svx/svdobj.hxx> #include <svx/svdtrans.hxx> -//////////////////////////////////////////////////////////////////////////////////////////////////// +static const Size aGlueHalfSize(4,4); void SdrGluePoint::SetReallyAbsolute(bool bOn, const SdrObject& rObj) { @@ -250,10 +250,13 @@ void SdrGluePoint::Invalidate(Window& rWin, const SdrObject* pObj) const Point aPt(pObj!=NULL ? GetAbsolutePos(*pObj) : GetPos()); aPt=rWin.LogicToPixel(aPt); rWin.EnableMapMode(sal_False); - long x=aPt.X(),y=aPt.Y(); // Size fixed to 7 pixels for now + + Size aSiz( aGlueHalfSize ); + Rectangle aRect(aPt.X()-aSiz.Width(),aPt.Y()-aSiz.Height(), + aPt.X()+aSiz.Width(),aPt.Y()+aSiz.Height()); // do not erase background, that causes flicker (!) - rWin.Invalidate(Rectangle(Point(x-3,y-3),Point(x+3,y+3)), INVALIDATE_NOERASE); + rWin.Invalidate(aRect, INVALIDATE_NOERASE); rWin.EnableMapMode(bMapMerk); } @@ -261,7 +264,7 @@ void SdrGluePoint::Invalidate(Window& rWin, const SdrObject* pObj) const bool SdrGluePoint::IsHit(const Point& rPnt, const OutputDevice& rOut, const SdrObject* pObj) const { Point aPt(pObj!=NULL ? GetAbsolutePos(*pObj) : GetPos()); - Size aSiz=rOut.PixelToLogic(Size(3,3)); + Size aSiz=rOut.PixelToLogic(aGlueHalfSize); Rectangle aRect(aPt.X()-aSiz.Width(),aPt.Y()-aSiz.Height(),aPt.X()+aSiz.Width(),aPt.Y()+aSiz.Height()); return aRect.IsInside(rPnt); } |