mirror of
https://github.com/greenshot/greenshot
synced 2025-08-20 13:33:27 -07:00
finally fixed last problems with position and invalidation of zoomer
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2317 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
53c361424c
commit
23f429d277
1 changed files with 7 additions and 6 deletions
|
@ -468,6 +468,7 @@ namespace Greenshot.Forms {
|
|||
/// <param name="size"></param>
|
||||
/// <returns></returns>
|
||||
private Rectangle ZoomArea(Point pos, Size size) {
|
||||
Rectangle ret;
|
||||
const int distanceX = 20;
|
||||
const int distanceY = 20;
|
||||
Rectangle tl = new Rectangle(pos.X - (distanceX + size.Width), pos.Y - (distanceY + size.Height), size.Width, size.Height);
|
||||
|
@ -476,14 +477,16 @@ namespace Greenshot.Forms {
|
|||
Rectangle br = new Rectangle(pos.X + distanceX, pos.Y + distanceY, size.Width, size.Height);
|
||||
Rectangle screenBounds = Screen.GetBounds(pos);
|
||||
if (screenBounds.Contains(br)) {
|
||||
return br;
|
||||
ret = br;
|
||||
} else if (screenBounds.Contains(bl)) {
|
||||
return bl;
|
||||
ret = bl;
|
||||
} else if (screenBounds.Contains(tr)) {
|
||||
return tr;
|
||||
ret = tr;
|
||||
} else {
|
||||
return tl;
|
||||
ret = tl;
|
||||
}
|
||||
ret.Offset(-capture.ScreenBounds.Location.X, -capture.ScreenBounds.Location.Y);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -502,8 +505,6 @@ namespace Greenshot.Forms {
|
|||
graphics.CompositingQuality = CompositingQuality.HighSpeed;
|
||||
graphics.PixelOffsetMode = PixelOffsetMode.None;
|
||||
|
||||
destinationRectangle.Offset(-capture.ScreenBounds.Location.X, -capture.ScreenBounds.Location.Y);
|
||||
|
||||
using (GraphicsPath path = new GraphicsPath()) {
|
||||
path.AddEllipse(destinationRectangle);
|
||||
using (Region clipRegion = new Region(path)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue