Вопрос

I want to fill a slice of a rectangle based upon a value which doesn't correlate to the degree of the rectangle that needs to be filled.

Say this square below, I would want the area that is light gray to get bigger and bigger (Like a slice of a pie getting bigger) until the entire square is light gray.

A picture of a square

How would I go about doing this using System.Drawing? I tried using FillPie but it doesn't fill the square corners

Это было полезно?

Решение

Set the Graphics.Clip property to a region that represents the rectangle, then FillPie with an oversized radius such that the "pie" completely covers the rectangle.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top