Essentially I am looking for a PHP function or equation that will output the Matrix values used in SVG transform.
I have hunted high and low and unfortunately have found nothing.
I am well aware of the rotate() and scale function() however these are not what I am in need of.
I need to be able to take a rotation angle in degrees along with x/y scale data and output a series of values in SVG transform format matrix(a,b,c,d,e,f)
Ideally I would like to be doing this in PHP but as stated, a standard mathematical equation would help also.
Hopefully someone can point me in the right direction.
You can compute the values by multiplying the matrices of the single transformations. Have a look in the SVG specification to find their definition:
Depending on the order the transformations should be applied (rotation before scaling vs. scaling before rotation), you get different matrices: