mirror of
https://github.com/greenshot/greenshot
synced 2025-08-19 21:13:23 -07:00
Fix the invalidate rectangle size, which causes graphics artifacts when moving it around.
This commit is contained in:
parent
fc0791bdb6
commit
100ad04059
1 changed files with 3 additions and 1 deletions
|
@ -132,9 +132,11 @@ namespace Greenshot.Drawing {
|
|||
if (Status != EditStatus.UNDRAWN) {
|
||||
int lineThickness = GetFieldValueAsInt(FieldType.LINE_THICKNESS);
|
||||
Color lineColor = GetFieldValueAsColor(FieldType.LINE_COLOR);
|
||||
bool shadow = GetFieldValueAsBool(FieldType.SHADOW);
|
||||
using (Pen pen = new Pen(lineColor, lineThickness)) {
|
||||
int inflateValue = lineThickness + 2 + (shadow ? 6 : 0);
|
||||
using (GraphicsPath tailPath = CreateTail()) {
|
||||
return Rectangle.Inflate(Rectangle.Union(Rectangle.Round(tailPath.GetBounds(new Matrix(), pen)), GuiRectangle.GetGuiRectangle(Left, Top, Width, Height)), lineThickness + 2, lineThickness + 2);
|
||||
return Rectangle.Inflate(Rectangle.Union(Rectangle.Round(tailPath.GetBounds(new Matrix(), pen)), GuiRectangle.GetGuiRectangle(Left, Top, Width, Height)), inflateValue, inflateValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue