GraphicsTester: additional rounded rectangle tests
Add tests for rounded rectangles with user-defined distinct horizontal and vertical radii
This commit is contained in:
Родитель
4588d80c01
Коммит
bcc5019216
|
@ -20,6 +20,7 @@ namespace GraphicsTester.Scenarios
|
|||
DrawShadowedRect(canvas);
|
||||
DrawRoundedRectanglesWithDifferentStrokeLocations(canvas);
|
||||
DrawRoundedRectWithZeroAndLargeRadius(canvas);
|
||||
DrawRoundedWithDifferentXYRadius(canvas);
|
||||
canvas.RestoreState();
|
||||
|
||||
canvas.DrawRoundedRectangle(50.5f, 30.5f, 150, 15, 5);
|
||||
|
@ -103,5 +104,11 @@ namespace GraphicsTester.Scenarios
|
|||
canvas.DrawRoundedRectangle(250.5f, 700.5f, 150, 20, 0);
|
||||
canvas.DrawRoundedRectangle(450.5f, 700.5f, 150, 20, 50);
|
||||
}
|
||||
|
||||
private void DrawRoundedWithDifferentXYRadius(ICanvas canvas)
|
||||
{
|
||||
RectangleF rect = new RectangleF(275, 400, 100, 100);
|
||||
canvas.DrawRoundedRectangle(rect, xRadius: 20, yRadius: 40);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@ namespace GraphicsTester.Scenarios
|
|||
FillRoundedRectanglesWithAlpha(canvas);
|
||||
FillShadowedRect(canvas);
|
||||
FillRoundedRectWithZeroAndLargeRadius(canvas);
|
||||
FillRoundedWithDifferentXYRadius(canvas);
|
||||
}
|
||||
|
||||
private static void FillShadowedRect(ICanvas canvas)
|
||||
|
@ -59,5 +60,11 @@ namespace GraphicsTester.Scenarios
|
|||
canvas.FillRoundedRectangle(250.5f, 700.5f, 150, 20, 0);
|
||||
canvas.FillRoundedRectangle(450.5f, 700.5f, 150, 20, 50);
|
||||
}
|
||||
|
||||
private void FillRoundedWithDifferentXYRadius(ICanvas canvas)
|
||||
{
|
||||
RectangleF rect = new RectangleF(275, 400, 100, 100);
|
||||
canvas.FillRoundedRectangle(rect, xRadius: 20, yRadius: 40);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче