PHP 클래스 JBZoo\Image\Text

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

보호된 프로퍼티들

프로퍼티 타입 설명
$_default

공개 메소드들

메소드 설명
render ( mixed $image, string $text, string $fFile, array $params = [] ) Add text to an image

보호된 메소드들

메소드 설명
_getColor ( mixed $image, string | array $colors ) : array Determine text color
_getStrokeX ( string $fontSize, integer $angle, string $fontFile, array $letters, string $charKey, integer $strokeSpacing, integer $textX ) : integer Get X offset for stroke rendering mode
_getTextboxSize ( string $fontSize, integer $angle, string $fontFile, string $text ) : array Determine textbox size
_render ( mixed $image, string $text, array $font, array $coords ) : array Compact args for imagettftext()
_renderStroke ( mixed $image, string $text, array $font, array $coords, array $stroke ) : array Same as imagettftext(), but allows for a stroke color and size

메소드 상세

_getColor() 보호된 정적인 메소드

Determine text color
protected static _getColor ( mixed $image, string | array $colors ) : array
$image mixed GD resource
$colors string | array
리턴 array

_getStrokeX() 보호된 정적인 메소드

Get X offset for stroke rendering mode
protected static _getStrokeX ( string $fontSize, integer $angle, string $fontFile, array $letters, string $charKey, integer $strokeSpacing, integer $textX ) : integer
$fontSize string
$angle integer
$fontFile string
$letters array
$charKey string
$strokeSpacing integer
$textX integer
리턴 integer

_getTextboxSize() 보호된 정적인 메소드

Determine textbox size
protected static _getTextboxSize ( string $fontSize, integer $angle, string $fontFile, string $text ) : array
$fontSize string
$angle integer
$fontFile string
$text string
리턴 array

_render() 보호된 정적인 메소드

Compact args for imagettftext()
protected static _render ( mixed $image, string $text, array $font, array $coords ) : array
$image mixed A GD image object
$text string The text to output
$font array [$fontfile, $fontsize, $color, $angle]
$coords array [X,Y] Coordinate of the starting position
리턴 array

_renderStroke() 보호된 정적인 메소드

Same as imagettftext(), but allows for a stroke color and size
protected static _renderStroke ( mixed $image, string $text, array $font, array $coords, array $stroke ) : array
$image mixed A GD image object
$text string The text to output
$font array [$fontfile, $fontsize, $color, $angle]
$coords array [X,Y] Coordinate of the starting position
$stroke array [$strokeSize, $strokeColor]
리턴 array

render() 공개 정적인 메소드

Add text to an image
public static render ( mixed $image, string $text, string $fFile, array $params = [] )
$image mixed GD resource
$text string Some text to output on image as watermark
$fFile string TTF font file path
$params array Additional render params

프로퍼티 상세

$_default 보호되어 있는 정적으로 프로퍼티

protected static $_default