ipe::Matrix Class Reference
Ipe Geometry

`#include <ipegeo.h>`

## Public Member Functions

| Matrix ()
| Matrix (const Linear &linear)
| Matrix (const Linear &linear, const Vector &t)
| Matrix (double m11, double m21, double m12, double m22, double t1, double t2)
| Matrix (const Vector &v)
| Matrix (String str)
Matrix | inverse () const
Vector | operator* (const Vector &rhs) const
Bezier | operator* (const Bezier &rhs) const
Vector | translation () const
Linear | linear () const
double | determinant () const
bool | isIdentity () const
bool | operator== (const Matrix &rhs) const

## Public Attributes

double | a [6]

## Related Functions

(Note that these are not member functions.)
Stream & | operator<< (Stream &stream, const Matrix &rhs)
Bezier | operator* (const Bezier &rhs) const
Vector | operator* (const Vector &rhs) const
Matrix | operator* (const Matrix &lhs, const Matrix &rhs)
Arc | operator* (const Matrix &lhs, const Arc &rhs)

## Detailed Description

Homogeneous transformation in the plane.

## Constructor & Destructor Documentation

## Matrix() [1/6]

ipe::Matrix::Matrix | ( |  | ) |

inline

Create identity matrix.

Referenced by ipe::Linear::inverse().

## Matrix() [2/6]

ipe::Matrix::Matrix | ( | const Linear & | linear | ) |

inline

Create linear matrix.

References ipe::Linear::a.

## Matrix() [3/6]

ipe::Matrix::Matrix | ( | const Linear & | linear,
|  | const Vector & | t
| ) |  |

inline explicit

References ipe::Linear::a, ipe::Vector::x, and ipe::Vector::y.

## Matrix() [4/6]

ipe::Matrix::Matrix | ( | double | m11,
|  | double | m21,
|  | double | m12,
|  | double | m22,
|  | double | t1,
|  | double | t2
| ) |  |

inline explicit

Create matrix with given coefficients.

## Matrix() [5/6]

ipe::Matrix::Matrix | ( | const Vector & | v | ) |

inline explicit

Create translation matrix.

References ipe::Vector::x, and ipe::Vector::y.

## Matrix() [6/6]

Matrix::Matrix | ( | String | str | ) |

explicit

Parse string.

## Member Function Documentation

## inverse()

Matrix Matrix::inverse | ( |  | ) | const

Return inverse.

References a.

Referenced by ipe::Arc::Arc(), ipe::Path::clone(), ipe::Arc::distance(), and ipe::CairoPainter::executeStream().

## operator*() [1/2]

Vector ipe::Matrix::operator* | ( | const Vector & | rhs | ) | const

inline

## operator*() [2/2]

Bezier ipe::Matrix::operator* | ( | const Bezier & | rhs | ) | const

inline

## translation()

Vector ipe::Matrix::translation | ( |  | ) | const

inline

Return translation component.

Referenced by ipe::Text::checkStyle(), ipe::CairoPainter::doDrawText(), ipe::Path::draw(), and ipe::Painter::untransform().

## linear()

Linear ipe::Matrix::linear | ( |  | ) | const

inline

Return linear transformation component of this affine transformation.

Referenced by ipe::Path::clone(), ipe::Path::draw(), ipe::CairoPainter::executeStream(), ipe::Arc::intersect(), and ipe::Snap::setEdge().

## determinant()

double ipe::Matrix::determinant | ( |  | ) | const

inline

Return determinant of the matrix.

Referenced by ipe::Shape::load().

## isIdentity()

bool ipe::Matrix::isIdentity | ( |  | ) | const

inline

Is this the identity matrix?

Referenced by ipe::StyleSheet::saveAsXml(), and ipe::Object::saveAttributesAsXml().

## operator==()

bool ipe::Matrix::operator== | ( | const Matrix & | rhs | ) | const

inline

Check for equality of two matrices.

References a.

## Friends And Related Function Documentation

## operator<<()

Stream & operator<< | ( | Stream & | stream,
|  | const Matrix & | rhs
| ) |  |

related

## operator*() [1/4]

Bezier operator* | ( | const Bezier & | rhs | ) | const

related

Transform Bezier spline.

References ipe::Bezier::iV.

## operator*() [2/4]

Vector operator* | ( | const Vector & | rhs | ) | const

related

Matrix times vector.

References ipe::Vector::x, and ipe::Vector::y.

## operator*() [3/4]

Matrix operator* | ( | const Matrix & | lhs,
|  | const Matrix & | rhs
| ) |  |

related

Matrix multiplication.

References a.

## operator*() [4/4]

Arc operator* | ( | const Matrix & | lhs,
|  | const Arc & | rhs
| ) |  |

related

Transform arc.

References ipe::Arc::Arc(), ipe::Arc::iAlpha, ipe::Arc::iBeta, and ipe::Arc::iM.

## Member Data Documentation

## a

double ipe::Matrix::a[6]

Referenced by ipe::Text::checkStyle(), ipe::Shape::draw(), ipe::CairoPainter::executeStream(), inverse(), operator*(), operator==(), ipe::Painter::translate(), and ipe::Painter::untransform().

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

- ipegeo.h
- ipegeo.cpp