PHP 클래스 Grafika\Position

파일 보기 프로젝트 열기: kosinix/grafika 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( string $position = 'center', integer $offsetX, integer $offsetY ) Position constructor.
getOffsetX ( ) : integer
getOffsetY ( ) : integer
getText ( ) : string
getXY ( integer $canvasWidth, integer $canvasHeight, integer $imageWidth, integer $imageHeight ) : array Translate the textual position + offsets into x,y values.

메소드 상세

__construct() 공개 메소드

Position constructor.
public __construct ( string $position = 'center', integer $offsetX, integer $offsetY )
$position string Defaults to center.
$offsetX integer Defaults to 0.
$offsetY integer Defaults to 0.

getOffsetX() 공개 메소드

public getOffsetX ( ) : integer
리턴 integer

getOffsetY() 공개 메소드

public getOffsetY ( ) : integer
리턴 integer

getText() 공개 메소드

public getText ( ) : string
리턴 string

getXY() 공개 메소드

Translate the textual position + offsets into x,y values.
public getXY ( integer $canvasWidth, integer $canvasHeight, integer $imageWidth, integer $imageHeight ) : array
$canvasWidth integer Width of canvas.
$canvasHeight integer Height of canvas.
$imageWidth integer Width of image/object added.
$imageHeight integer Height of image/object added.
리턴 array Array of X and Y coordinates: array($x, $y).