Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
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: