classes-Com-Tecnick-Pdf-Graph-Style

It appears that you are using AdBlocking software. The cost of running this website is covered by advertisements. If you like it please feel free to a small amount of money to secure the future of this website.

Style extends Base

in package

AbstractYes

Com\Tecnick\Pdf\Graph\Style

Tags
since
2011-05-23
category

Library

author

Nicola Asuni info@tecnick.com

copyright

2011-2024 Nicola Asuni - Tecnick.com LTD

license

http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)

link
https://github.com/tecnickcom/tc-lib-pdf-graph
phpstan-import-type

StyleDataOpt from \Com\Tecnick\Pdf\Graph\Base

SuppressWarnings

(PHPMD.ExcessiveClassComplexity)

Table of Contents

Constants

IDMATRIX  = [1.0, 0.0, 0.0, 1.0, 0.0, 0.0]
Identity matrix for transformations.
MPI  = 3.141592653589793
Pi constant We use this instead of M_PI because HHVM has a different value.

Methods

__construct()  : mixed
Initialize
add()  : string
Add a new style
getCurrentStyleArray()  : StyleDataOpt
Returns the last style array.
getCurrentStyleItem()  : mixed
Returns the value of th especified item from the last inserted style.
getDefaultStyle()  : StyleData
Returns the default style.
getExtGState()  : string
Add transparency parameters to the current extgstate.
getLastExtGStateID()  : int|null
Returns the last extgstate ID to be used with XOBjects.
getLastStyleProperty()  : mixed
Returns the last set value of the specified property.
getModeWithoutClose()  : string
Remove the Close option from the specified Path paint operator.
getModeWithoutFill()  : string
Remove the Fill option from the specified Path paint operator.
getModeWithoutStroke()  : string
Remove the Stroke option from the specified Path paint operator.
getObjectNumber()  : int
Returns current PDF object number
getOutExtGState()  : string
Get the PDF output string for ExtGState
getOutExtGStateResources()  : string
Get the PDF output string for ExtGState Resource Dictionary
getOutExtGStateResourcesByKeys()  : string
Get the PDF output string for ExtGState Resource Dictionary for XOBjects.
getOutGradientResources()  : string
Get the PDF output string for Gradients Resource Dictionary
getOutGradientResourcesByKeys()  : string
Returns the PDF command to output gradient resources.
getOutGradientShaders()  : string
Get the PDF output string for gradient shaders
getPathPaintOp()  : string
Get the Path-Painting Operators.
getStyle()  : string
Returns the PDF string of the last style added.
getStyleCmd()  : string
Returns the PDF string of the specified style.
initStyle()  : void
Initialize default style
isClippingMode()  : bool
Returns true if the specified mode is of clippping type.
isClosingMode()  : bool
Returns true if the specified mode includes "closing the path" option.
isFillingMode()  : bool
Returns true if the specified path paint operator includes the filling option.
isStrokingMode()  : bool
Returns true if the specified mode includes the stroking option.
pop()  : string
Remove and return last style.
restoreStyleStatus()  : void
Restore the saved style status.
saveStyleStatus()  : void
Save the current style ID to be restored later.
setKUnit()  : static
Set unit of measure conversion ratio.
setPageHeight()  : static
Set page height
setPageWidth()  : static
Set page width

Constants

IDMATRIX

Identity matrix for transformations.

public TTMatrix IDMATRIX = [1.0, 0.0, 0.0, 1.0, 0.0, 0.0]

MPI

Pi constant We use this instead of M_PI because HHVM has a different value.

public float MPI = 3.141592653589793

Methods

__construct()

Initialize

public __construct(float $kunit, float $pagew, float $pageh, Pdf $pdfColor, Encrypt $encrypt[, bool $pdfa = false ][, bool $compress = true ]) : mixed
Parameters
$kunit : float

Unit of measure conversion ratio.

$pagew : float

Page width.

$pageh : float

Page height.

$pdfColor : Pdf

Color object.

$encrypt : Encrypt
$pdfa : bool = false

True if we are in PDF/A mode.

$compress : bool = true

Set to false to disable stream compression.

add()

Add a new style

public add([StyleDataOpt $style = [] ][, bool $inheritlast = false ]) : string
Parameters
$style : StyleDataOpt = []

Style to add.

$inheritlast : bool = false

If true inherit missing values from the last style.

Return values
string

PDF style string

getCurrentStyleArray()

Returns the last style array.

public getCurrentStyleArray() : StyleDataOpt
Return values
StyleDataOpt

getCurrentStyleItem()

Returns the value of th especified item from the last inserted style.

public getCurrentStyleItem(string $item) : mixed
Parameters
$item : string

Item to search.

getDefaultStyle()

Returns the default style.

public getDefaultStyle([StyleDataOpt $style = [] ]) : StyleData
Parameters
$style : StyleDataOpt = []

Style parameters to merge to the default ones.

Return values
StyleData

getExtGState()

Add transparency parameters to the current extgstate.

public getExtGState(array<string, mixed> $parms) : string
Parameters
$parms : array<string, mixed>

parameters.

Return values
string

PDF command.

getLastExtGStateID()

Returns the last extgstate ID to be used with XOBjects.

public getLastExtGStateID() : int|null
Return values
int|null

getLastStyleProperty()

Returns the last set value of the specified property.

public getLastStyleProperty(string $property[, mixed $default = null ]) : mixed
Parameters
$property : string

Property to search.

$default : mixed = null

Default value to return in case the property is not found.

Return values
mixed

Property value or $default in case the property is not found.

getModeWithoutClose()

Remove the Close option from the specified Path paint operator.

public getModeWithoutClose(string $mode) : string
Parameters
$mode : string

Path paint operator (mode of rendering).

Return values
string

getModeWithoutFill()

Remove the Fill option from the specified Path paint operator.

public getModeWithoutFill(string $mode) : string
Parameters
$mode : string

Path paint operator (mode of rendering).

Return values
string

getModeWithoutStroke()

Remove the Stroke option from the specified Path paint operator.

public getModeWithoutStroke(string $mode) : string
Parameters
$mode : string

Path paint operator (mode of rendering).

Return values
string

getObjectNumber()

Returns current PDF object number

public getObjectNumber() : int
Return values
int

getOutExtGState()

Get the PDF output string for ExtGState

public getOutExtGState(int $pon) : string
Parameters
$pon : int

Current PDF Object Number

Return values
string

PDF command

getOutExtGStateResources()

Get the PDF output string for ExtGState Resource Dictionary

public getOutExtGStateResources() : string
Return values
string

PDF command

getOutExtGStateResourcesByKeys()

Get the PDF output string for ExtGState Resource Dictionary for XOBjects.

public getOutExtGStateResourcesByKeys(array<string|int, int> $keys) : string
Parameters
$keys : array<string|int, int>

Array of extgstates keys.

Return values
string

PDF command

getOutGradientResources()

Get the PDF output string for Gradients Resource Dictionary

public getOutGradientResources() : string
Return values
string

PDF command

getOutGradientResourcesByKeys()

Returns the PDF command to output gradient resources.

public getOutGradientResourcesByKeys(array<string|int, int> $keys) : string
Parameters
$keys : array<string|int, int>

Array of gradient keys.

Return values
string

PDF command

getOutGradientShaders()

Get the PDF output string for gradient shaders

public getOutGradientShaders(int $pon) : string
Parameters
$pon : int

Current PDF Object Number

Return values
string

PDF command

getPathPaintOp()

Get the Path-Painting Operators.

public getPathPaintOp(string $mode[, string $default = 'S' ]) : string
Parameters
$mode : string

Mode of rendering. Possible values are:

  • S or D: Stroke the path. - s or d: Close and stroke the path. - f or F: Fill the path, using the nonzero winding number rule to determine the region to fill. - f* or F*: Fill the path, using the even-odd rule to determine the region to fill. - B or FD or DF: Fill and then stroke the path, using the nonzero winding number rule to determine the region to fill. - B* or FD or DF: Fill and then stroke the path, using the even-odd rule to determine the region to fill. - b or fd or df: Close, fill, and then stroke the path, using the nonzero winding number rule to determine the region to fill. - b or fd or df: Close, fill, and then stroke the path, using the even-odd rule to determine the region to fill. - CNZ: Clipping mode using the even-odd rule to determine which regions lie inside the clipping path. - CEO: Clipping mode using the nonzero winding number rule to determine which regions lie inside the clipping path - n: End the path object without filling or stroking it.
$default : string = 'S'

Default style

Return values
string

getStyle()

Returns the PDF string of the last style added.

public getStyle() : string
Return values
string

getStyleCmd()

Returns the PDF string of the specified style.

public getStyleCmd([StyleDataOpt $style = [] ]) : string
Parameters
$style : StyleDataOpt = []

Style to represent.

Return values
string

initStyle()

Initialize default style

public initStyle() : void

isClippingMode()

Returns true if the specified mode is of clippping type.

public isClippingMode(string $mode) : bool
Parameters
$mode : string

Path paint operator (mode of rendering).

Return values
bool

isClosingMode()

Returns true if the specified mode includes "closing the path" option.

public isClosingMode(string $mode) : bool
Parameters
$mode : string

Path paint operator (mode of rendering).

Return values
bool

isFillingMode()

Returns true if the specified path paint operator includes the filling option.

public isFillingMode(string $mode) : bool
Parameters
$mode : string

Path paint operator (mode of rendering).

Return values
bool

isStrokingMode()

Returns true if the specified mode includes the stroking option.

public isStrokingMode(string $mode) : bool
Parameters
$mode : string

Path paint operator (mode of rendering).

Return values
bool

pop()

Remove and return last style.

public pop() : string
Return values
string

PDF style string.

restoreStyleStatus()

Restore the saved style status.

public restoreStyleStatus() : void

saveStyleStatus()

Save the current style ID to be restored later.

public saveStyleStatus() : void

setKUnit()

Set unit of measure conversion ratio.

public setKUnit(float $kunit) : static
Parameters
$kunit : float

Unit of measure conversion ratio.

Return values
static

setPageHeight()

Set page height

public setPageHeight(float $pageh) : static
Parameters
$pageh : float

Page height

Return values
static

setPageWidth()

Set page width

public setPageWidth(float $pagew) : static
Parameters
$pagew : float

Page width

Return values
static
On this page
 

© 2004-2024 – Nicola Asuni - Tecnick.com - All rights reserved.
about - disclaimer - privacy