How to draw a special kind line?

Chai Zhou hxsmfk at HOTMAIL.COM
Tue Dec 21 23:50:26 EST 2004


Sorry,I'm english poor.

I want to draw a special line type, e.g. The Great Wall. Now, a simple at
http://www.thegreatwall.com.cn/public/TheGreatWallWebGis/sample.php.

I programing skill is poor. I have find msDrawLineSymbolGD function. Follow
code draw dashed line.

    int k=0, sc;

    sc = fc; // start with foreground color
    for(i=0; i<symbol->stylelength; i++) {
      for(j=0; j<symbol->style[i]; j++) {
        styleDashed[k] = sc;
        k++;
      }
      if(sc==fc) sc = bc; else sc = fc;
    }
    gdImageSetStyle(img, styleDashed, k);

    if(!brush && !symbol->img)
      imagePolyline(img, p, gdStyled, ox, oy);
    else
      imagePolyline(img, p, gdStyledBrushed, ox, oy);

I think maybe use repeat y offset and draw line can do I want, but failure
and find reason:space coordinate.

I want to help.
1¡¢Can I draw a line without space coordinate?
2¡¢If impossibility, who can give me a good idea?

Thanks a lot!

_________________________________________________________________
ÏíÓÃÊÀ½çÉÏ×î´óµÄµç×ÓÓʼþϵͳ¡ª MSN Hotmail¡£  http://www.hotmail.com



More information about the mapserver-users mailing list