protected function doTransform(Matrix $mA, $extra = null)
    {
        if (is_null($extra)) {
            $extra = self::ROT_90;
        } else {
            if (!array_key_exists($extra, $this->rotationMatrices)) {
                throw new TransformationException('Rotation angle not supported');
            }
        }

        //simple cases
        if ($mA->is('empty') || $mA->is('singleitem')) {
            return clone $mA;
        }

        $this->assertMatrixIsComplete($mA);

        return $this->rotate($mA, $this->rotationMatrices[$extra]);
    }