19 #include <grass/gis.h>
20 #include <grass/symbol.h>
26 G_debug(5,
" add_coor %d, %d", x, y);
27 if (chain->scount == chain->salloc) {
29 chain->sx = (
int *)G_realloc(chain->sx, chain->salloc *
sizeof(
int));
30 chain->sy = (
int *)G_realloc(chain->sy, chain->salloc *
sizeof(
int));
32 chain->sx[chain->scount] = x;
33 chain->sy[chain->scount] = y;
51 G_debug(5,
" stroke_chain(): ch = %d", ch);
52 chain = part->chain[ch];
54 G_debug(5,
" element count = %d", chain->count);
56 for (k = 0; k < chain->count; k++) {
57 elem = chain->elem[k];
60 G_debug(5,
" LINE count = %d", elem->coor.line.count);
61 for (l = 0; l < elem->coor.line.count; l++) {
62 x = s * elem->coor.line.x[l];
63 y = s * elem->coor.line.y[l];
79 G_debug(5,
" ARC da = %f r = %f", da, r);
82 a1 =
PI * elem->coor.arc.a1 / 180;
85 a2 =
PI * elem->coor.arc.a2 / 180;
89 if (elem->coor.arc.clock) {
91 x = s * elem->coor.arc.x + s * r * cos(a1);
92 y = s * elem->coor.arc.y + s * r * sin(a1);
113 x = s * elem->coor.arc.x + s * r * cos(a1);
114 y = s * elem->coor.arc.y + s * r * sin(a1);
135 if (part->type == S_POLYGON) {
147 void S_stroke(SYMBOL * Symb,
int size,
double rotation,
int tolerance)
153 G_debug(3,
"S_stroke(): size = %d rotation = %f tolerance = %d", size,
154 rotation, tolerance);
158 s = size * Symb->scale;
160 for (i = 0; i < Symb->count; i++) {
162 part = Symb->part[i];
163 switch (part->type) {
165 for (j = 0; j < part->count; j++) {