Bitrix API

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_RIGHT

public mixed ALIGN_RIGHT = "right"

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

getFontSize()

public getFontSize(int $width) : float
Parameters
$width : int
Return values
float

In pt.

getHorizontalAlignment()

public getHorizontalAlignment() : string
Return values
string

getPadding()

public getPadding() : int
Return values
int

getRatio()

public getRatio() : float
Tags
inheritDoc
Return values
float

getUtfText()

public getUtfText() : string
Return values
string

UTF-8

getVerticalAlignment()

public getVerticalAlignment() : string
Return values
string

isCopyright()

public isCopyright() : bool
Return values
bool

setAlignment()

public setAlignment(string $hAlign, string $vAlign) : $this
Parameters
$hAlign : string

ALIGN_* constants

$vAlign : string

ALIGN_* constants

Return values
$this

        
On this page

Search results