TextStrokeStyle
in package
implements
JsonSerializable
FinalYes
Text outline/stroke styling.
Tags
Table of Contents
Interfaces
- JsonSerializable
Properties
Methods
- create() : self
- Create a text stroke.
- jsonSerialize() : array<string, mixed>
- {@inheritdoc}
- setColor() : $this
- Set the stroke color.
- setWidth() : $this
- Set the stroke width.
Properties
$color
The stroke color.
private
string|null
$color
= null
$width
The stroke width.
private
int|null
$width
= null
Methods
create()
Create a text stroke.
public
static create(string $color[, int $width = 1 ]) : self
Parameters
- $color : string
-
The stroke color.
- $width : int = 1
-
The stroke width.
Return values
self —A new instance.
jsonSerialize()
{@inheritdoc}
public
jsonSerialize() : array<string, mixed>
Return values
array<string, mixed>setColor()
Set the stroke color.
public
setColor(string $color) : $this
Parameters
- $color : string
-
The color in hex format.
Return values
$thissetWidth()
Set the stroke width.
public
setWidth(int $width) : $this
Parameters
- $width : int
-
The width in points.