문제

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