imagedashedline

PHP 4, PHP 5, PHP 7, PHP 8
imagedashedline - Draw a dashed line
Manual
Code Examples

imagedashedline( GdImage$image, int$x1, int$y1, int$x2, int$y2, int$color ): bool

This function is deprecated. Use combination of imagesetstyle and imageline instead.

Parameters

image

A GdImage object, returned by one of the image creation functions, such as imagecreatetruecolor.

x1

Upper left x coordinate.

y1

Upper left y coordinate 0, 0 is the top left corner of the image.

x2

Bottom right x coordinate.

y2

Bottom right y coordinate.

color

The fill color. A color identifier created with imagecolorallocate.

Return Values

Returns true on success or false on failure.

Changelog

Version Description
8.0.0 image expects a GdImage instance now; previously, a resource was expected.

Related Functions

Example of imagedashedline

Show all examples for imagedashedline

PHP Version:


Function imagedashedline:

Image Processing and GD Functions

Most used PHP functions