Matrix extensions based on GiderosCodingEasy by ar2rsawseen with a few fixes/changes.
local matrix = Matrix.new()
matrix:translate(self._positionX, self._positionY)
matrix:rotate(self._rotation)
matrix:scaleX(self._scaleX)
matrix:scaleY(self._scaleY)
matrix:translate(-anchorOffsetX, -anchorOffsetY)
self:setMatrix(matrix)