16 lines
458 B
C#
16 lines
458 B
C#
namespace DrawFigureLibrary.Figures
|
|
{
|
|
public class CircleFigure : EllipseFigure
|
|
{
|
|
public CircleFigure(string name, int x, int y, int diameter) : base(name, x, y, diameter, diameter) { }
|
|
|
|
public void ChangeRadius(int newRadius)
|
|
{
|
|
if (newRadius <= 0) throw new ArgumentException("Радиус должен быть > 0");
|
|
int d = newRadius * 2;
|
|
w = d;
|
|
h = d;
|
|
}
|
|
}
|
|
}
|