GraphicsState
in package
A simple graphic state class which holds the current transformation matrix.
Table of Contents
Properties
Methods
- __construct() : mixed
- add() : $this
- rotate() : $this
- scale() : $this
- toUserSpace() : Vector
- translate() : $this
Properties
$ctm
protected
Matrix
$ctm
Methods
__construct()
public
__construct([Matrix|null $ctm = null ]) : mixed
Parameters
- $ctm : Matrix|null = null
add()
public
add(Matrix $matrix) : $this
Parameters
- $matrix : Matrix
Return values
$thisrotate()
public
rotate(int|float $x, int|float $y, int|float $angle) : $this
Parameters
- $x : int|float
- $y : int|float
- $angle : int|float
Return values
$thisscale()
public
scale(int|float $scaleX, int|float $scaleY) : $this
Parameters
- $scaleX : int|float
- $scaleY : int|float
Return values
$thistoUserSpace()
public
toUserSpace(Vector $vector) : Vector
Parameters
- $vector : Vector
Return values
Vectortranslate()
public
translate(int|float $shiftX, int|float $shiftY) : $this
Parameters
- $shiftX : int|float
- $shiftY : int|float