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