[GRASS5] symbols: arc
Martin Landa
landa at gama.fsv.cvut.cz
Wed May 11 06:05:21 EDT 2005
Hi,
I have tried to solve the problem which I described in GRASSLIST
(see [GRASSLIST:6741] Re: symbols and map units).
I am not sure about my patch ... so please check it.
Martin
--
Martin Landa <landa at gama.fsv.cvut.cz> * http://gama.fsv.cvut.cz/~landa *
CTU Prague, Faculty of Civil Engineering, Czech Republic
-------------- next part --------------
*** stroke.c 2005-05-11 11:54:28.000000000 +0200
--- stroke.c.new 2005-05-11 11:54:04.000000000 +0200
***************
*** 18,24 ****
#include "gis.h"
#include "symbol.h"
! #define PI 3.14159265
void
add_coor ( SYMBCHAIN *chain, int x, int y)
--- 18,25 ----
#include "gis.h"
#include "symbol.h"
! /*#define PI 3.14159265*/
! #define PI M_PI
void
add_coor ( SYMBCHAIN *chain, int x, int y)
***************
*** 86,96 ****
if ( first ) {
x0 = x;
y0 = y;
- first = 0;
}
! if ( a1 == a2 ) break;
a1 -= da;
! if ( a1 < a2 ) a1 = a2;
}
} else {
--- 87,105 ----
if ( first ) {
x0 = x;
y0 = y;
}
!
! if ( (a1 < (a2 + da) && a1 > (a2 - da)) ||
! (a1 < (a2 + da - 2 * PI) && a1 > (a2 - da - 2 * PI) && !first) ||
! chain -> scount > 37 )
! break;
!
! if ( first ) {
! first = 0;
! }
!
a1 -= da;
! /* if ( a1 < a2 ) a1 = a2; */
}
} else {
***************
*** 101,111 ****
if ( first ) {
x0 = x;
y0 = y;
- first = 0;
}
! if ( a1 == a2 ) break;
a1 += da;
! if ( a1 > a2 ) a1 = a2;
}
}
break;
--- 110,127 ----
if ( first ) {
x0 = x;
y0 = y;
}
!
! if ( (a1 < (a2 + da) && a1 > (a2 - da)) ||
! (a1 < (a2 + da - 2 * PI) && a1 > (a2 - da - 2 * PI) && !first) ||
! chain -> scount > 37 )
! break;
!
! if ( first ) {
! first = 0;
! }
a1 += da;
! /*if ( a1 > a2 ) a1 = a2;*/
}
}
break;
More information about the grass-dev
mailing list