Documentation

RectangleShape 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
$x1  : int
X-Coordinate of top-left point
$x2  : int
X-Coordinate of bottom-right point
$y1  : int
Y-Coordinate of top-left point
$y2  : int
Y-Coordinate of bottom-right point

Methods

__construct()  : mixed
Create new rectangle shape instance
applyToImage()  : bool
Draw rectangle to given image at certain position
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

Methods

__construct()

Create new rectangle shape instance

public __construct([int $x1 = null ][, int $y1 = null ][, int $x2 = null ][, int $y2 = null ]) : mixed
Parameters
$x1 : int = null
$y1 : int = null
$x2 : int = null
$y2 : int = null

applyToImage()

Draw rectangle to given image at certain position

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

        
On this page

Search results