Style object.

Style object doesn't directly correspond to any PDF file object. It's utility class, used as a container for style information. It's used by Zend_Pdf_Page class in draw operations.

package Zend_Pdf
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License

 Methods

Create style.

__construct(\Zend_Pdf_Style $anotherStyle = null

Parameters

$anotherStyle

\Zend_Pdf_Style

Get fill color.

getFillColor() : \Zend_Pdf_Color | null

Returns

\Zend_Pdf_Colornull

Get current font.

getFont() : \Zend_Pdf_Resource_Font

Returns

\Zend_Pdf_Resource_Font$font

Get current font size

getFontSize() : float

Returns

float$fontSize

Get line color.

getLineColor() : \Zend_Pdf_Color | null

Returns

\Zend_Pdf_Colornull

Get line dashing pattern

getLineDashingPattern() : array

Returns

array

Get line dashing phase

getLineDashingPhase() : float

Returns

float

Get line width.

getLineWidth() : float

Returns

float

Dump style to a string, which can be directly inserted into content stream

instructions() : string

Returns

string

Set fill color.

setFillColor(\Zend_Pdf_Color $color) 

Parameters

$color

\Zend_Pdf_Color

Set current font.

setFont(\Zend_Pdf_Resource_Font $font, float $fontSize) 

Parameters

$font

\Zend_Pdf_Resource_Font

$fontSize

float

Modify current font size

setFontSize(float $fontSize) 

Parameters

$fontSize

float

Set line color.

setLineColor(\Zend_Pdf_Color $color) 

Parameters

$color

\Zend_Pdf_Color

Set line dashing pattern

setLineDashingPattern(array $pattern, float $phase = 0

Parameters

$pattern

array

$phase

float

Set line width.

setLineWidth(float $width) 

Parameters

$width

float

 Properties

 

Line color.

$_color : \Zend_Pdf_Color | null

Default

Current color, used for lines and font outlines.

 

Fill color.

$_fillColor : \Zend_Pdf_Color | null

Default

null

Used to fill geometric shapes or text.

 

Current font

$_font : \Zend_Pdf_Resource_Font

Default

 

Font size

$_fontSize : float

Default

 

Array which describes line dashing pattern.

$_lineDashingPattern : array

Default

It's array of numeric: array($on_length, $off_length, $on_length, $off_length, ...)

 

Line dashing phase

$_lineDashingPhase : float

Default

 

Line width.

$_lineWidth : \Zend_Pdf_Element_Numeric

Default