phpdftk API Documentation

DashPattern
in package

FinalYes

Dash pattern for stroked paths.

Wraps the PDF dash array + phase for use with Page::drawLine() and other stroked shape methods.

Table of Contents

Properties

$pattern  : array<string|int, mixed>
$phase  : float

Methods

__construct()  : mixed
dashDot()  : self
dashed()  : self
dotted()  : self
solid()  : self
toOperatorArgs()  : array{0: float[], 1: float}

Properties

$pattern read-only

public array<string|int, mixed> $pattern

Methods

__construct()

public __construct(array<string|int, float> $pattern[, float $phase = 0 ]) : mixed
Parameters
$pattern : array<string|int, float>

Alternating on/off lengths in points (e.g. [4, 2])

$phase : float = 0

Offset into the pattern to start at

dashDot()

public static dashDot([float $dash = 6 ][, float $dot = 1 ][, float $gap = 2 ]) : self
Parameters
$dash : float = 6
$dot : float = 1
$gap : float = 2
Return values
self

dashed()

public static dashed([float $on = 4 ][, float $off = 4 ]) : self
Parameters
$on : float = 4
$off : float = 4
Return values
self

dotted()

public static dotted([float $dot = 1 ][, float $gap = 2 ]) : self
Parameters
$dot : float = 1
$gap : float = 2
Return values
self

solid()

public static solid() : self
Return values
self

toOperatorArgs()

public toOperatorArgs() : array{0: float[], 1: float}
Return values
array{0: float[], 1: float}

For ContentStream::setDashPattern()


        
On this page

Search results