Struct pdf_canvas::graphicsstate::Matrix[][src]

pub struct Matrix { /* fields omitted */ }

A transformation matrix for the pdf graphics state.

Matrixes can be created with numerous named constructors and combined by multiplication.

Examples

canvas.concat(Matrix::translate(10.0, 24.0))?;

// Matrixes can be combined by multiplication:
canvas.concat(Matrix::translate(7.0, 0.0) * Matrix::rotate_deg(45.0))?;
// ... will be visualy identical to:
canvas.concat(Matrix::translate(7.0, 0.0))?;
canvas.concat(Matrix::rotate_deg(45.0))?;

Methods

impl Matrix
[src]

Construct a matrix for translation

Construct a matrix for rotating by a radians.

Construct a matrix for rotating by a degrees.

Construct a matrix for scaling by factor sx in x-direction and by sy in y-direction.

Construct a matrix for scaling by the same factor, s in both directions.

Construct a matrix for skewing.

Trait Implementations

impl Display for Matrix
[src]

Formats the value using the given formatter. Read more

impl Mul for Matrix
[src]

The resulting type after applying the * operator.

Performs the * operation.

Auto Trait Implementations

impl Send for Matrix

impl Sync for Matrix