PHP:Drawing Lines

From Progzoo
Jump to: navigation, search

ImageLine ($image, 60, 40, 60, 100, $color) draws a line from (60,40) to (60,100) on the image $image using color $color.

We can control the thickness, style of lines.

Thickness

line thickness
Sets the thickness of the line to be drawn.

ImageSetThickness ($image , 5) sets the thickness of the lines for 5 pixels on the image $image.


[Font] [Default] [Show] [Resize] [History] [Profile]

Brush

brush
Sets the brush of the line to be drawn.

ImageSetBrush ($image, $brush) set the brush for the lines on the image $image.
To draw the line using a brush simply use it instead of the color:
ImageLine ($image, 60, 40, 60, 100, IMG_COLOR_BRUSHED)


[Font] [Default] [Show] [Resize] [History] [Profile]