24void PNG_Box(
double fx1,
double fy1,
double fx2,
double fy2)
26 int x1 = (int)floor(fx1 + 0.5);
27 int y1 = (int)floor(fy1 + 0.5);
28 int x2 = (int)floor(fx2 + 0.5);
29 int y2 = (int)floor(fy2 + 0.5);
34 tmp = x1, x1 = x2, x2 = tmp;
37 tmp = y1, y1 = y2, y2 = tmp;
39 if (x2 < 0 || x1 >
png.width)
42 if (y2 < 0 || y1 >
png.height)
45 if (x1 <
png.clip_left)
48 if (x2 >
png.clip_rite)
51 if (y1 <
png.clip_top)
54 if (y2 >
png.clip_bot)
57 for (y = y1; y < y2; y++) {
58 unsigned int *p = &
png.grid[y *
png.width + x1];
60 for (
x = x1;
x < x2;
x++)
61 *p++ =
png.current_color;
void PNG_Box(double fx1, double fy1, double fx2, double fy2)
Draw a (filled) rectangle.