mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-05 20:54:31 +13:00
Fix rounded rectangle region 1 off issue
This commit is contained in:
parent
90307fe841
commit
2d6853029c
3 changed files with 12 additions and 4 deletions
|
@ -77,7 +77,7 @@ public override void OnDraw(Graphics g)
|
||||||
|
|
||||||
public override void OnShapePathRequested(GraphicsPath gp, Rectangle rect)
|
public override void OnShapePathRequested(GraphicsPath gp, Rectangle rect)
|
||||||
{
|
{
|
||||||
gp.AddRoundedRectangle(rect, Radius);
|
gp.AddRoundedRectangle(rect, Radius, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -47,7 +47,7 @@ public override void OnConfigSave()
|
||||||
|
|
||||||
public override void OnShapePathRequested(GraphicsPath gp, Rectangle rect)
|
public override void OnShapePathRequested(GraphicsPath gp, Rectangle rect)
|
||||||
{
|
{
|
||||||
gp.AddRoundedRectangle(rect, Radius);
|
gp.AddRoundedRectangle(rect, Radius, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -163,8 +163,16 @@ public bool IsCurrentShapeTypeRegion
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return CurrentShapeType == ShapeType.RegionRectangle || CurrentShapeType == ShapeType.RegionRoundedRectangle || CurrentShapeType == ShapeType.RegionEllipse ||
|
switch (CurrentShapeType)
|
||||||
CurrentShapeType == ShapeType.RegionFreehand;
|
{
|
||||||
|
case ShapeType.RegionRectangle:
|
||||||
|
case ShapeType.RegionRoundedRectangle:
|
||||||
|
case ShapeType.RegionEllipse:
|
||||||
|
case ShapeType.RegionFreehand:
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue