20 static void line(
double m[2][3],
double x0,
double y0,
double x1,
double y1)
22 double tx0 = m[0][0] * x0 + m[0][1] * y0 + m[0][2];
23 double ty0 = m[1][0] * x0 + m[1][1] * y0 + m[1][2];
24 double tx1 = m[0][0] * x1 + m[0][1] * y1 + m[0][2];
25 double ty1 = m[1][0] * x1 + m[1][1] * y1 + m[1][2];
43 void D_plot_icon(
double xc,
double yc,
int type,
double angle,
double scale)
45 static double old_a = 1e299, old_s = 0;
46 static double sin_a, cos_a;
47 static double m[2][3];
49 G_debug(2,
"D_plot_icon(): xc=%g, yc=%g", xc, yc);
55 if (angle != old_a || scale != old_s) {
56 m[0][0] = cos_a * scale;
57 m[0][1] = -sin_a * scale;
58 m[1][0] = sin_a * scale;
59 m[1][1] = cos_a * scale;
66 line(m, -0.5, 0.0, 0.5, 0.0);
67 line(m, 0.0, -0.5, 0.0, 0.5);
70 line(m, -0.5, -0.5, 0.5, -0.5);
71 line(m, 0.5, -0.5, 0.5, 0.5);
72 line(m, 0.5, 0.5, -0.5, 0.5);
73 line(m, -0.5, 0.5, -0.5, -0.5);
76 line(m, -1, 0.5, 0, 0.0);
77 line(m, -1, -0.5, 0, 0.0);
void D_line_abs(double, double, double, double)
void G_warning(const char *,...) __attribute__((format(printf
void D_plot_icon(double xc, double yc, int type, double angle, double scale)
Plot icon.
int G_debug(int, const char *,...) __attribute__((format(printf