PHP Class Grafika\DrawingObject\Line

ファイルを表示 Open project: kosinix/grafika

Protected Properties

Property Type Description
$color Grafika\Color
$point1 array X,Y pos 1.
$point2 array X,Y pos 2.
$thickness Thickness of line.

Public Methods

Method Description
__construct ( array $point1, array $point2, integer $thickness = 1, Color | string $color = '#000000' ) Creates a line.
getColor ( ) : Color
getPoint1 ( ) : array
getPoint2 ( ) : array
getThickness ( ) : integer

Method Details

__construct() public method

Creates a line.
public __construct ( array $point1, array $point2, integer $thickness = 1, Color | string $color = '#000000' )
$point1 array Array containing int X and int Y position of the starting point.
$point2 array Array containing int X and int Y position of the starting point.
$thickness integer Thickness in pixel. Note: This is currently ignored in GD editor and falls back to 1.
$color Grafika\Color | string Color of the line. Defaults to black.

getColor() public method

public getColor ( ) : Color
return Grafika\Color

getPoint1() public method

public getPoint1 ( ) : array
return array

getPoint2() public method

public getPoint2 ( ) : array
return array

getThickness() public method

public getThickness ( ) : integer
return integer

Property Details

$color protected_oe property

protected Color,Grafika $color
return Grafika\Color

$point1 protected_oe property

X,Y pos 1.
protected array $point1
return array

$point2 protected_oe property

X,Y pos 2.
protected array $point2
return array

$thickness protected_oe property

Thickness of line.
protected $thickness