Как добавить текст внутрь эллипса?
Есть класс который позволяет нарисовать эллипс по координатам x, y на канвасе. Как можно добавить текст внутрь эллипса?
class draw
{
public static void circle(double x, double y, int width, int height, Canvas cv)
{
Ellipse circle = new Ellipse()
{
Width = width,
Height = height,
Stroke = Brushes.Red,
StrokeThickness = 6
};
cv.Children.Add(circle);
circle.SetValue(Canvas.LeftProperty, (double)x);
circle.SetValue(Canvas.TopProperty, (double)y);
}
}
draw.circle(x, y, 10, 10, cavRoot);