Re: [GD-DEVEL] Help with drawing lines

From: Date: Wed, 14 Oct 2009 12:51:31 +0000
Subject: Re: [GD-DEVEL] Help with drawing lines
References: 1  Groups: php.gd.devel 
Request: Send a blank email to php-gd-devel+get-614@lists.php.net to get a copy of this message
hi, I don't the image, can you send it again pls? On Wed, Oct 14, 2009 at 2:48 PM, Aleksandar Nedeljkovic <sasko2909@gmail.com> wrote: > Hi, > I need to draw a various types of lines, and I have a problem with drawing > dashed lines with width greater then 1 pixel. > Here is my code: > #include "gd.h" > #include <stdio.h> > int main() { > gdImagePtr im; > int styleDotted[2], styleDashed[6]; > FILE * jpegout; > int black; > int red; > im = gdImageCreate(100, 100); > black = gdImageColorAllocate(im, 0, 0, 0); > red = gdImageColorAllocate(im, 255, 0, 0); > styleDashed[0] = red; > styleDashed[1] = red; > styleDashed[2] = red; > styleDashed[3] = red; > styleDashed[4] = gdTransparent; > styleDashed[5] = gdTransparent; > gdImageSetThickness(im, 2); > gdImageSetStyle(im, styleDashed, 6); > gdImageLine(im, 0, 12, 99, 12, gdStyled); > jpegout = fopen("test3.jpg", "wb"); > gdImageJpeg(im, jpegout, -1); > fclose(jpegout); > gdImageDestroy(im); > return 0; > } > Image created with this program is in attachment. Did I miss something, or > what? > Thanks in advance. > -- > GD Devel Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- Pierre http://blog.thepimp.net | http://www.libgd.org

« previous php.gd.devel (#614) next »