TwistPHP Documentation

line

File path: dist/twist/Core/Models/Image/Image.model.php
Namespace: Twist\Core\Models\Image
Extends:

lineDraw a line on the image, you have the option of setting the width of the line. The line can be drawn at any angle

Parameters

Name Type Description
$intStartXintegern/a
$intStartYintegern/a
$intEndXintegern/a
$intEndYintegern/a
[$strFillColour = ']stringn/a
[$intWidth = 1]integern/a

Return Values

void — No return information has been documented for this function.

Example

<?php
//Set the variables for the example
$intStartX 124;
$intStartY 124;
$intEndX 124;
$intEndY 124;
$strFillColour ';
$intWidth = 1;

//Call the function line with the example vars
$resImage = new \Twist\Core\Models\Image\Image();
$resImage -> line($intStartX, $intStartY, $intEndX, $intEndY, $strFillColour, $intWidth);