PHP Класс Grafika\DrawingObject\Rectangle

Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$borderColor Grafika\Color
$borderSize integer
$fillColor Grafika\Color
$height integer Image height in pixels
$pos array X and Y position in an array.
$width integer Image width in pixels

Открытые методы

Метод Описание
__construct ( integer $width, integer $height, array $pos = [0, 0], integer $borderSize = 1, Color | string | null $borderColor = '#000000', Color | string | null $fillColor = '#FFFFFF' ) Creates a rectangle.
getBorderColor ( ) : Color
getBorderSize ( ) : integer
getFillColor ( ) : Color
getHeight ( ) : integer
getPos ( ) : array
getWidth ( ) : integer

Описание методов

__construct() публичный Метод

Creates a rectangle.
public __construct ( integer $width, integer $height, array $pos = [0, 0], integer $borderSize = 1, Color | string | null $borderColor = '#000000', Color | string | null $fillColor = '#FFFFFF' )
$width integer Width of rectangle in pixels.
$height integer Height in pixels.
$pos array Array of X and Y position. X is the distance in pixels from the left of the canvass to the left of the rectangle. Y is the distance from the top of the canvass to the top of the rectangle. Defaults to array(0,0).
$borderSize integer Size of the border in pixels. Defaults to 1 pixel. Set to 0 for no border.
$borderColor Grafika\Color | string | null Border color. Defaults to black. Set to null for no color.
$fillColor Grafika\Color | string | null Fill color. Defaults to white. Set to null for no color.

getBorderColor() публичный Метод

public getBorderColor ( ) : Color
Результат Grafika\Color

getBorderSize() публичный Метод

public getBorderSize ( ) : integer
Результат integer

getFillColor() публичный Метод

public getFillColor ( ) : Color
Результат Grafika\Color

getHeight() публичный Метод

public getHeight ( ) : integer
Результат integer

getPos() публичный Метод

public getPos ( ) : array
Результат array

getWidth() публичный Метод

public getWidth ( ) : integer
Результат integer

Описание свойств

$borderColor защищенное свойство

protected Color,Grafika $borderColor
Результат Grafika\Color

$borderSize защищенное свойство

protected int $borderSize
Результат integer

$fillColor защищенное свойство

protected Color,Grafika $fillColor
Результат Grafika\Color

$height защищенное свойство

Image height in pixels
protected int $height
Результат integer

$pos защищенное свойство

X and Y position in an array.
protected array $pos
Результат array

$width защищенное свойство

Image width in pixels
protected int $width
Результат integer