Documentation

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  : array<string|int, mixed>
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
formatPoints()  : array<string|int, mixed>
Format polygon points to Imagick format

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 array<string|int, mixed> $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
bool

background()

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
Return values
bool

formatPoints()

Format polygon points to Imagick format

private formatPoints(array<string|int, mixed> $points) : array<string|int, mixed>
Parameters
$points : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results