Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
GraphicsState Class Reference

A simple graphic state class which holds the current transformation matrix. More...

Public Member Functions

 __construct (Matrix $ctm=null)
 
 add (Matrix $matrix)
 
 rotate ($x, $y, $angle)
 
 scale ($scaleX, $scaleY)
 
 toUserSpace (Vector $vector)
 
 translate ($shiftX, $shiftY)
 

Protected Attributes

Matrix $ctm
 

Detailed Description

A simple graphic state class which holds the current transformation matrix.

Constructor & Destructor Documentation

◆ __construct()

GraphicsState::__construct ( Matrix $ctm = null)
Parameters
Matrix | null$ctm

Member Function Documentation

◆ add()

GraphicsState::add ( Matrix $matrix)
Parameters
Matrix$matrix
Return values
$this

◆ rotate()

GraphicsState::rotate ( $x,
$y,
$angle )
Parameters
int | float$x
int | float$y
int | float$angle
Return values
$this

◆ scale()

GraphicsState::scale ( $scaleX,
$scaleY )
Parameters
int | float$scaleX
int | float$scaleY
Return values
$this

◆ toUserSpace()

GraphicsState::toUserSpace ( Vector $vector)
Parameters
Vector$vector
Return values
Vector

◆ translate()

GraphicsState::translate ( $shiftX,
$shiftY )
Parameters
int | float$shiftX
int | float$shiftY
Return values
$this

The documentation for this class was generated from the following file: