Documentation

LineShape 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
$color  : string
Color of line
$width  : int
Width of line in pixels
$x  : int
Starting point x-coordinate of line
$y  : int
Starting point y-coordinate of line

Methods

__construct()  : mixed
Create new line shape instance
applyToImage()  : bool
Draw current instance of line to given endpoint on given image
background()  : void
Set text to be written
border()  : void
Set border width and color of current shape
color()  : void
Set current line color
hasBorder()  : bool
Determines if current shape has border
width()  : void
Set current line width in pixels

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

$color

Color of line

public string $color = '#000000'

$width

Width of line in pixels

public int $width = 1

$x

Starting point x-coordinate of line

public int $x = 0

$y

Starting point y-coordinate of line

public int $y = 0

Methods

__construct()

Create new line shape instance

public __construct([int $x = null ][, int $y = null ]) : mixed
Parameters
$x : int = null
$y : int = null

applyToImage()

Draw current instance of line to given endpoint 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

color()

Set current line color

public color(string $color) : void
Parameters
$color : string

hasBorder()

Determines if current shape has border

public hasBorder() : bool
Return values
bool

width()

Set current line width in pixels

public width(int $width) : void
Parameters
$width : int

        
On this page

Search results