Public Member Functions | Static Public Member Functions | Public Attributes

UT_SVGMatrix Class Reference

#include <ut_svg.h>

List of all members.

Public Member Functions

UT_SVGMatrix multiply (const UT_SVGMatrix &matrix)
UT_SVGMatrix inverse ()
UT_SVGMatrix translate (float x, float y)
UT_SVGMatrix scale (float scaleFactor)
UT_SVGMatrix scaleNonUniform (float scaleFactorX, float scaleFactorY)
UT_SVGMatrix rotate (float angle)
UT_SVGMatrix rotateFromVector (float x, float y)
UT_SVGMatrix flipX ()
UT_SVGMatrix flipY ()
UT_SVGMatrix skewX (float angle)
UT_SVGMatrix skewY (float angle)
 UT_SVGMatrix (float a=1, float b=0, float c=0, float d=1, float e=0, float f=0)
 ~UT_SVGMatrix ()

Static Public Member Functions

static bool applyTransform (UT_SVGMatrix *currentMatrix, const char *transformAttribute)
 Parse the SVG "transform" attribute and apply the transformations to the current matrix.

Public Attributes

float a
float b
float c
float d
float e
float f

Constructor & Destructor Documentation

UT_SVGMatrix::UT_SVGMatrix ( float  a = 1,
float  b = 0,
float  c = 0,
float  d = 1,
float  e = 0,
float  f = 0 
)
UT_SVGMatrix::~UT_SVGMatrix (  ) 

Member Function Documentation

bool UT_SVGMatrix::applyTransform ( UT_SVGMatrix currentMatrix,
const char *  transformAttribute 
) [static]

Parse the SVG "transform" attribute and apply the transformations to the current matrix.

Parameters:
currentMatrix the current matrix
the "transform" attribute
Returns:
Returns false if there is parse error; otherwise true, even if transformAttribute is NULL (equivalent to no transform).

References BNF_comma_wsp(), BNF_number(), BNF_wsp_star(), multiply(), rotate(), scaleNonUniform(), skewX(), skewY(), translate(), UT_ASSERT, and UT_DEBUGMSG.

UT_SVGMatrix UT_SVGMatrix::flipX (  ) 

References a, b, c, d, e, and f.

UT_SVGMatrix UT_SVGMatrix::flipY (  ) 

References a, b, c, d, e, and f.

UT_SVGMatrix UT_SVGMatrix::inverse (  ) 

References a, b, c, d, e, and f.

UT_SVGMatrix UT_SVGMatrix::multiply ( const UT_SVGMatrix matrix  ) 

References a, b, c, d, e, and f.

Referenced by applyTransform(), rotate(), and rotateFromVector().

UT_SVGMatrix UT_SVGMatrix::rotate ( float  angle  ) 

References multiply(), and UT_PI.

Referenced by applyTransform().

UT_SVGMatrix UT_SVGMatrix::rotateFromVector ( float  x,
float  y 
)

References a, b, c, d, e, f, and multiply().

UT_SVGMatrix UT_SVGMatrix::scale ( float  scaleFactor  ) 

References a, b, c, d, e, and f.

UT_SVGMatrix UT_SVGMatrix::scaleNonUniform ( float  scaleFactorX,
float  scaleFactorY 
)

References a, b, c, d, e, and f.

Referenced by applyTransform().

UT_SVGMatrix UT_SVGMatrix::skewX ( float  angle  ) 

References a, b, c, d, e, f, and UT_PI.

Referenced by applyTransform().

UT_SVGMatrix UT_SVGMatrix::skewY ( float  angle  ) 

References a, b, c, d, e, f, and UT_PI.

Referenced by applyTransform().

UT_SVGMatrix UT_SVGMatrix::translate ( float  x,
float  y 
)

References a, b, c, d, e, and f.

Referenced by applyTransform().


Member Data Documentation


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