symbols - inprecise rendering

"R. Müller" r.mueller at UNICOMP-BERLIN.DE
Tue Apr 24 11:58:59 EDT 2007


thanx John,

for everyone who is interested in :

its ticket no #1716
"MS_NINT assembly macro is broken"

and as you mentioned its fixed in 4.10

as a quick and dirty hack :

look for this block in "map.h" and comment it out :
(only if your running mapserver version 4.6!)

------------------BLOCK-START---------------------
#if defined(WE_HAVE_THE_C99_LRINT)
#   define MS_NINT(x) lrint(x)
#elif defined(_MSC_VER) && defined(_WIN32) && !defined(USE_GENERIC_MS_NINT)
     static __inline long int MS_NINT (double flt)
     {   int intgr;

     _asm
         {       fld flt
                     fistp intgr
                     } ;

     return intgr ;
     }
#elif defined(i386) && defined(__GNUC_PREREQ) && 
!defined(USE_GENERIC_MS_NINT)
     static __inline long int MS_NINT( double __x )
     {
         long int __lrintres;
         __asm__ __volatile__
           ("fistpl %0"
            : "=m" (__lrintres) : "t" (__x) : "st");
         return __lrintres;
     }
#else
#  define MS_NINT(x)      ((x) >= 0.0 ? ((long) ((x)+.5)) : ((long) 
((x)-.5)))
#endif
------------------BLOCK-END---------------------

leave only this define statement uncommented

#define MS_NINT(x)      ((x) >= 0.0 ? ((long) ((x)+.5)) : ((long) ((x)-.5)))

and just recompile your mapserver !



regards

ronald


John Cole schrieb:
> Ronald,
>   There was an issue with a math library in 4.6-4.8.  If you try that in 4.4
> or 4.10, that issue isn't there.  If the bug tracker is up, you should be
> able to find more information on it.
> 
>   The issue was a problem with the round function, if I remember correctly
> and could cause the very problem your seeing.  My examples were with squares
> on squares.
> 
> John
> 
> 
> 
> "R. Müller" wrote:
>> Hi,
>>
>> i've got a question concerning rendering symbols in mapserver. I'm 
>> working with mapserver 4.6 mostly on linux-based maschines and noticed 
>> that under certain circumstances the rendering of point symbols is quit 
>> inexactly.
>>
>> in the following test-case i wanted to draw gray-filled circles with a 
>> black border. in this case i didn't used the newer style-syntax but the 
>> result is quit the same. in the rendered image the two cirlces (inner 
>> circle and border are not located in the same origin, one circle is 
>> shifted for some pixels)
>>
>>  
>>
> 

-- 
*****************************************************************
*M-UniComp Verkehrssysteme GmbH
*
*Dipl.-Ing. Ronald Müller
*Softwareentwicklung
*
*Plauener Straße 163-165, Haus 11
*13053 Berlin
*
*fon   : +49 ( 0 ) 30  / 98 31 700 70
*fax   : +49 ( 0 ) 30  / 98 31 700 77
*mobil : +49 ( 0 ) 172 / 93 95 004
*email : r.mueller at unicomp-berlin.de
*web   : www.unicomp-berlin.de
*
*Geschaeftsfuehrer: Andreas Dreher
*Sitz der Gesellschaft: Berlin
*Registergericht: Berlin Amtsgericht Charlottenburg, HRB 35329
*****************************************************************



More information about the mapserver-users mailing list