TextWatermark extends Watermark
Table of Contents
Constants
- ALIGN_BOTTOM = "bottom"
- ALIGN_CENTER = "center"
- ALIGN_LEFT = "left"
- ALIGN_RIGHT = "right"
- ALIGN_TOP = "top"
- SIZE_BIG = "big"
- SIZE_MEDIUM = "medium"
- SIZE_SMALL = "small"
Methods
- __construct() : mixed
- TextWatermark constructor.
- alignPosition() : mixed
- getColor() : Color
- getFont() : string
- getFontSize() : float
- getHorizontalAlignment() : string
- getPadding() : int
- getRatio() : float
- getText() : string
- getUtfText() : string
- getVerticalAlignment() : string
- getWidth() : int
- isCopyright() : bool
- setAlignment() : $this
- setColor() : TextWatermark
- setCopyright() : TextWatermark
- setFont() : TextWatermark
- setPadding() : Watermark
- setRatio() : Watermark
- setSize() : Watermark
- setText() : TextWatermark
- setWidth() : TextWatermark
Constants
ALIGN_BOTTOM
public
mixed
ALIGN_BOTTOM
= "bottom"
ALIGN_CENTER
public
mixed
ALIGN_CENTER
= "center"
ALIGN_LEFT
public
mixed
ALIGN_LEFT
= "left"
ALIGN_RIGHT
public
mixed
ALIGN_RIGHT
= "right"
ALIGN_TOP
public
mixed
ALIGN_TOP
= "top"
SIZE_BIG
public
mixed
SIZE_BIG
= "big"
SIZE_MEDIUM
public
mixed
SIZE_MEDIUM
= "medium"
SIZE_SMALL
public
mixed
SIZE_SMALL
= "small"
Methods
__construct()
TextWatermark constructor.
public
__construct(string $text, string $font[, Color|null $color = null ]) : mixed
Parameters
- $text : string
-
Text to show on an image.
- $font : string
-
Full path to a ttf font file.
- $color : Color|null = null
-
Text color.
alignPosition()
public
alignPosition(int $width, int $height, Rectangle $position) : mixed
Parameters
- $width : int
- $height : int
- $position : Rectangle
getColor()
public
getColor() : Color
Return values
ColorgetFont()
public
getFont() : string
Return values
stringgetFontSize()
public
getFontSize(int $width) : float
Parameters
- $width : int
Return values
float —In pt.
getHorizontalAlignment()
public
getHorizontalAlignment() : string
Return values
stringgetPadding()
public
getPadding() : int
Return values
intgetRatio()
public
getRatio() : float
Tags
Return values
floatgetText()
public
getText() : string
Return values
stringgetUtfText()
public
getUtfText() : string
Return values
string —UTF-8
getVerticalAlignment()
public
getVerticalAlignment() : string
Return values
stringgetWidth()
public
getWidth() : int
Return values
intisCopyright()
public
isCopyright() : bool
Return values
boolsetAlignment()
public
setAlignment(string $hAlign, string $vAlign) : $this
Parameters
- $hAlign : string
-
ALIGN_* constants
- $vAlign : string
-
ALIGN_* constants
Return values
$thissetColor()
public
setColor(Color $color) : TextWatermark
Parameters
- $color : Color
Return values
TextWatermarksetCopyright()
public
setCopyright(bool $copyright) : TextWatermark
Parameters
- $copyright : bool
Return values
TextWatermarksetFont()
public
setFont(string $font) : TextWatermark
Parameters
- $font : string
Return values
TextWatermarksetPadding()
public
setPadding(int $padding) : Watermark
Parameters
- $padding : int
Return values
WatermarksetRatio()
public
setRatio(float $ratio) : Watermark
Parameters
- $ratio : float
Return values
WatermarksetSize()
public
setSize(string $size) : Watermark
Parameters
- $size : string
-
SIZE_* constants
Return values
WatermarksetText()
public
setText(string $text) : TextWatermark
Parameters
- $text : string
Return values
TextWatermarksetWidth()
public
setWidth(int $width) : TextWatermark
Parameters
- $width : int