PolygonShape
extends AbstractShape
in package
Table of Contents
Properties
- $background : string
- Background color of shape
- $border_color : string
- Border color of current shape
- $border_width : int
- Border width of shape
- $points : int
- Array of points of polygon
Methods
- __construct() : mixed
- Create new polygon instance
- applyToImage() : bool
- Draw polygon on given image
- background() : void
- Set text to be written
- border() : void
- Set border width and color of current shape
- hasBorder() : bool
- Determines if current shape has border
Properties
$background
Background color of shape
public
string
$background
$border_color
Border color of current shape
public
string
$border_color
$border_width
Border width of shape
public
int
$border_width
= 0
$points
Array of points of polygon
public
int
$points
Methods
__construct()
Create new polygon instance
public
__construct(array<string|int, mixed> $points) : mixed
Parameters
- $points : array<string|int, mixed>
applyToImage()
Draw polygon on given image
public
applyToImage(Image $image[, int $x = 0 ][, int $y = 0 ]) : bool
Parameters
- $image : Image
- $x : int = 0
- $y : int = 0
Return values
boolbackground()
Set text to be written
public
background(mixed $color) : void
Parameters
- $color : mixed
border()
Set border width and color of current shape
public
border(int $width[, string $color = null ]) : void
Parameters
- $width : int
- $color : string = null
hasBorder()
Determines if current shape has border
public
hasBorder() : bool