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
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
$phase read-only
public
float
$phase
= 0
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
selfdashed()
public
static dashed([float $on = 4 ][, float $off = 4 ]) : self
Parameters
- $on : float = 4
- $off : float = 4
Return values
selfdotted()
public
static dotted([float $dot = 1 ][, float $gap = 2 ]) : self
Parameters
- $dot : float = 1
- $gap : float = 2
Return values
selfsolid()
public
static solid() : self
Return values
selftoOperatorArgs()
public
toOperatorArgs() : array{0: float[], 1: float}
Return values
array{0: float[], 1: float} —For ContentStream::setDashPattern()