- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
float EllipseSquare(Bitmap bmp, float x, float y, float a, float b) {
DrawEllipse(bmp, x,y, a, b);
int n;
for (int y = 0; y < bmp.height; y++) {
for (int x = 0; x < bmp.height; x++) {
if (bmp.GetPixel(x,y).Color == Color(255,255,255)) {
n++;
}
}
}
return bmp.GetSquare() * (float) n / (float) (bmp.width * bmp.height);
}