Fix rounded rectangle region 1 off issue

This commit is contained in:
Jaex 2016-08-08 21:31:07 +03:00
parent 90307fe841
commit 2d6853029c
3 changed files with 12 additions and 4 deletions

View file

@ -77,7 +77,7 @@ public override void OnDraw(Graphics g)
public override void OnShapePathRequested(GraphicsPath gp, Rectangle rect)
{
gp.AddRoundedRectangle(rect, Radius);
gp.AddRoundedRectangle(rect, Radius, 0);
}
}
}

View file

@ -47,7 +47,7 @@ public override void OnConfigSave()
public override void OnShapePathRequested(GraphicsPath gp, Rectangle rect)
{
gp.AddRoundedRectangle(rect, Radius);
gp.AddRoundedRectangle(rect, Radius, 0);
}
}
}

View file

@ -163,8 +163,16 @@ public bool IsCurrentShapeTypeRegion
{
get
{
return CurrentShapeType == ShapeType.RegionRectangle || CurrentShapeType == ShapeType.RegionRoundedRectangle || CurrentShapeType == ShapeType.RegionEllipse ||
CurrentShapeType == ShapeType.RegionFreehand;
switch (CurrentShapeType)
{
case ShapeType.RegionRectangle:
case ShapeType.RegionRoundedRectangle:
case ShapeType.RegionEllipse:
case ShapeType.RegionFreehand:
return true;
}
return false;
}
}