23void PNG_Box(
double fx1,
double fy1,
double fx2,
double fy2)
25 int x1 = (int)floor(fx1 + 0.5);
26 int y1 = (int)floor(fy1 + 0.5);
27 int x2 = (int)floor(fx2 + 0.5);
28 int y2 = (int)floor(fy2 + 0.5);
33 tmp = x1, x1 = x2, x2 = tmp;
36 tmp = y1, y1 = y2, y2 = tmp;
38 if (x2 < 0 || x1 >
png.width)
41 if (y2 < 0 || y1 >
png.height)
44 if (x1 <
png.clip_left)
47 if (x2 >
png.clip_rite)
50 if (y1 <
png.clip_top)
53 if (y2 >
png.clip_bot)
56 for (y = y1; y < y2; y++) {
57 unsigned int *p = &
png.grid[y *
png.width + x1];
59 for (
x = x1;
x < x2;
x++)
60 *p++ =
png.current_color;
void PNG_Box(double fx1, double fy1, double fx2, double fy2)
Draw a (filled) rectangle.