ImageWatermark extends Watermark
Table of Contents
Constants
- ALIGN_BOTTOM = "bottom"
- ALIGN_CENTER = "center"
- ALIGN_LEFT = "left"
- ALIGN_RIGHT = "right"
- ALIGN_TOP = "top"
- MODE_EXACT = 'exact'
- MODE_REPEAT = 'repeat'
- MODE_RESIZE = 'resize'
- SIZE_BIG = "big"
- SIZE_MEDIUM = "medium"
- SIZE_REAL = "real"
- SIZE_SMALL = "small"
Methods
- __construct() : mixed
- ImageWatermark constructor.
- alignPosition() : mixed
- getAlpha() : float
- getHorizontalAlignment() : string
- getImageFile() : string|null
- getMode() : string
- getPadding() : int
- getRatio() : float
- getVerticalAlignment() : string
- setAlignment() : $this
- setAlpha() : ImageWatermark
- setImageFile() : ImageWatermark
- setMode() : ImageWatermark
- setPadding() : Watermark
- setRatio() : Watermark
- setSize() : Watermark
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"
MODE_EXACT
public
mixed
MODE_EXACT
= 'exact'
MODE_REPEAT
public
mixed
MODE_REPEAT
= 'repeat'
MODE_RESIZE
public
mixed
MODE_RESIZE
= 'resize'
SIZE_BIG
public
mixed
SIZE_BIG
= "big"
SIZE_MEDIUM
public
mixed
SIZE_MEDIUM
= "medium"
SIZE_REAL
public
mixed
SIZE_REAL
= "real"
SIZE_SMALL
public
mixed
SIZE_SMALL
= "small"
Methods
__construct()
ImageWatermark constructor.
public
__construct([string|null $imageFile = null ]) : mixed
Parameters
- $imageFile : string|null = null
-
Path to a watermark image.
alignPosition()
public
alignPosition(int $width, int $height, Rectangle $position) : mixed
Parameters
- $width : int
- $height : int
- $position : Rectangle
getAlpha()
public
getAlpha() : float
Return values
floatgetHorizontalAlignment()
public
getHorizontalAlignment() : string
Return values
stringgetImageFile()
public
getImageFile() : string|null
Return values
string|nullgetMode()
public
getMode() : string
Return values
stringgetPadding()
public
getPadding() : int
Return values
intgetRatio()
public
getRatio() : float
Return values
floatgetVerticalAlignment()
public
getVerticalAlignment() : string
Return values
stringsetAlignment()
public
setAlignment(string $hAlign, string $vAlign) : $this
Parameters
- $hAlign : string
-
ALIGN_* constants
- $vAlign : string
-
ALIGN_* constants
Return values
$thissetAlpha()
public
setAlpha(float $alpha) : ImageWatermark
Parameters
- $alpha : float
-
1.0 is opaque, 0.0 is transparent.
Return values
ImageWatermarksetImageFile()
public
setImageFile(string $imageFile) : ImageWatermark
Parameters
- $imageFile : string
Return values
ImageWatermarksetMode()
public
setMode(string $mode) : ImageWatermark
Parameters
- $mode : string
Return values
ImageWatermarksetPadding()
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