Function __global->imageline
Definitions
sources_custom/phpstub.php
- Draw an image between two points.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: bool
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $image | resource | No | No | required parameter | N/A | N/A | The GD image on which we are drawing the line |
| $x1 | integer | No | No | required parameter | N/A | N/A | The starting X position of the line |
| $y1 | integer | No | No | required parameter | N/A | N/A | The starting Y position of the line |
| $x2 | integer | No | No | required parameter | N/A | N/A | The ending X position of the line |
| $y2 | integer | No | No | required parameter | N/A | N/A | The ending Y position of the line |
| $color | integer | No | No | required parameter | N/A | N/A | The imagecolorallocate index for this line |
Returns
- Whether the line was successfully drawn
- Type: boolean
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Draw an image between two points.
*
* @param resource $image The GD image on which we are drawing the line
* @param integer $x1 The starting X position of the line
* @param integer $y1 The starting Y position of the line
* @param integer $x2 The ending X position of the line
* @param integer $y2 The ending Y position of the line
* @param integer $color The imagecolorallocate index for this line
* @return boolean Whether the line was successfully drawn
*/
function imageline($image, int $x1, int $y1, int $x2, int $y2, int $color) : bool
* Draw an image between two points.
*
* @param resource $image The GD image on which we are drawing the line
* @param integer $x1 The starting X position of the line
* @param integer $y1 The starting Y position of the line
* @param integer $x2 The ending X position of the line
* @param integer $y2 The ending Y position of the line
* @param integer $color The imagecolorallocate index for this line
* @return boolean Whether the line was successfully drawn
*/
function imageline($image, int $x1, int $y1, int $x2, int $y2, int $color) : bool
