Logo Search packages:      
Sourcecode: inkscape version File versions

Matrix Geom::from_basis ( Point const   x_basis,
Point const   y_basis,
Point const   offset 
)

Creates a Matrix given an axis and origin point. The axis is represented as two vectors, which represent skew, rotation, and scaling in two dimensions. from_basis(Point(1, 0), Point(0, 1), Point(0, 0)) would return the identity matrix.

Parameters:
x_basis the vector for the x-axis.
y_basis the vector for the y-axis.
offset the translation applied by the matrix.
Returns:
The new Matrix.

Definition at line 32 of file matrix.cpp.

                                                                                {
    return Matrix(x_basis[X], x_basis[Y],
                  y_basis[X], y_basis[Y],
                  offset [X], offset [Y]);
}


Generated by  Doxygen 1.6.0   Back to index