PHP 클래스 Grafika\DrawingObject\Rectangle

파일 보기 프로젝트 열기: kosinix/grafika

보호된 프로퍼티들

프로퍼티 타입 설명
$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