\Intervention\Image\Gd\ShapesRectangleShape

Summary

Methods
Properties
Constants
applyToImage()
background()
border()
hasBorder()
__construct()
$background
$border_color
$border_width
$x1
$y1
$x2
$y2
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$background

$background : string

Background color of shape

Type

string

$border_color

$border_color : string

Border color of current shape

Type

string

$border_width

$border_width : int

Border width of shape

Type

int

$x1

$x1 : int

X-Coordinate of top-left point

Type

int

$y1

$y1 : int

Y-Coordinate of top-left point

Type

int

$x2

$x2 : int

X-Coordinate of bottom-right point

Type

int

$y2

$y2 : int

Y-Coordinate of bottom-right point

Type

int

Methods

applyToImage()

applyToImage(\Intervention\Image\Image  $image, int  $x, int  $y) : bool

Draw rectangle to given image at certain position

Parameters

\Intervention\Image\Image $image
int $x
int $y

Returns

bool —

background()

background(mixed  $color) : void

Set text to be written

Parameters

mixed $color

border()

border(int  $width, string  $color = null) : void

Set border width and color of current shape

Parameters

int $width
string $color

hasBorder()

hasBorder() : bool

Determines if current shape has border

Returns

bool —

__construct()

__construct(int  $x1 = null, int  $y1 = null, int  $x2 = null, int  $y2 = null) : mixed

Create new rectangle shape instance

Parameters

int $x1
int $y1
int $x2
int $y2

Returns

mixed —