Ipelib: ipe::Matrix Class Reference

Ipelib

- Main Page
- Related Pages
- Modules
- Classes

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Public Attributes | Related Functions | List of all members
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

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

Create identity matrix.

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

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

Create linear matrix.

References ipe::Linear::a.

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

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

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

Create matrix with given coefficients.

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

Create translation matrix.

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

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

Parse string.

## Member Function Documentation

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

Return inverse.

References a.

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

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

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

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 ipe::Matrix::linear | ( |  | ) | const
| inline

Return linear transformation component of this affine transformation.

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

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

Return determinant of the matrix.

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

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

Is this the identity matrix?

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

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

Check for equality of two matrices.

References a.

## Friends And Related Function Documentation

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

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

Transform Bezier spline.

References ipe::Bezier::iV.

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

Matrix times vector.

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

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

Matrix multiplication.

References a.

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

double ipe::Matrix::a[6]

Referenced by ipe::Text::checkStyle(), ipe::CairoPainter::doDrawText(), ipe::Shape::draw(), 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