|  | libgpac
    Documentation of the core library of GPAC | 
import <evg.idl;
| Public Member Functions | |
| Matrix2D () | |
| Matrix2D (Matrix2D from) | |
| Matrix2D (double coefs...) | |
| Point2D | get_scale () | 
| Point2D | get_translate () | 
| double | get_rotate () | 
| Matrix2D | inverse () | 
| Matrix2D | copy () | 
| void | copy (Matrix2D from) | 
| Matrix2D | add (Matrix2D mx, optional boolean premultiply=false) | 
| Matrix2D | translate (double x, double y) | 
| Matrix2D | translate (Point2D vec) | 
| Matrix2D | rotate (double cx, double cy, double a) | 
| Matrix2D | scale (double sx, double sy) | 
| Matrix2D | scale (double sx, double sy, double cx, double cy, double angle) | 
| Matrix2D | skew (double skew_x, double skew_y) | 
| Matrix2D | skew_x (double skew) | 
| Matrix2D | skew_y (double skew) | 
| Point2D | apply (Point2D in) | 
| Rect | apply (Rect in) | 
| Data Fields | |
| attribute double | xx | 
| attribute double | xy | 
| attribute double | tx | 
| attribute double | yx | 
| attribute double | yy | 
| attribute boolean | identity | 
| attribute const boolean | is3D = false | 
2D matrix, see GF_Matrix2D the transformation of (x, y) into (x', y') is:
Most matrix functions return the path object itself, so that the operations can be chained:
All objects (Point2D, Rect) used in the API do not use constructors, their type is inferred if the expected attributes (eg x y, ...) are present in the object
| Matrix2D::Matrix2D | ( | ) | 
constructor
| Matrix2D::Matrix2D | ( | Matrix2D | from | ) | 
constructor
| from | the color matrix to use | 
| Matrix2D::Matrix2D | ( | double | coefs... | ) | 
constructor
| coefs | the matrix coefficients | 
| Point2D Matrix2D::get_scale | ( | ) | 
get scale part of the matrix after decomposition - see gf_mx2d_decompose
| Point2D Matrix2D::get_translate | ( | ) | 
get translate part of the matrix after decomposition - see gf_mx2d_decompose
| double Matrix2D::get_rotate | ( | ) | 
get rotation part of the matrix after decomposition - see gf_mx2d_decompose
| Matrix2D Matrix2D::inverse | ( | ) | 
inverse matrix - see gf_mx2d_inverse
| Matrix2D Matrix2D::copy | ( | ) | 
copies the matrix
| void Matrix2D::copy | ( | Matrix2D | from | ) | 
copies from a matrix
| from | the matrix to copy from | 
adds a matrix - see gf_mx2d_add_matrix and gf_mx2d_pre_multiply
| mx | the matrix to multiply | 
| premultiply | if true, performs mx * this  this * mx  | 
| Matrix2D Matrix2D::translate | ( | double | x, | 
| double | y | ||
| ) | 
add a translation - see gf_mx2d_add_translation
| x | horizontal translation | 
| y | vertical translation | 
| Matrix2D Matrix2D::rotate | ( | double | cx, | 
| double | cy, | ||
| double | a | ||
| ) | 
add a rotation - see gf_mx2d_add_rotation
| cx | center x coordinate | 
| cy | center y coordinate | 
| a | rotation angle | 
| Matrix2D Matrix2D::scale | ( | double | sx, | 
| double | sy | ||
| ) | 
adds scale - see gf_mx2d_add_scale
| sx | horizontal scale factor | 
| sy | vertical scale factor | 
| Matrix2D Matrix2D::scale | ( | double | sx, | 
| double | sy, | ||
| double | cx, | ||
| double | cy, | ||
| double | angle | ||
| ) | 
adds scale - see gf_mx2d_add_scale_at
| sx | horizontal scale factor | 
| sy | vertical scale factor | 
| cx | horizontal scaling center coordinate | 
| cy | vertical scaling center coordinate | 
| angle | scale orienttion angle in radians | 
| Matrix2D Matrix2D::skew | ( | double | skew_x, | 
| double | skew_y | ||
| ) | 
adds skew - see gf_mx2d_add_skew
| skew_x | horizontal skew factor | 
| skew_y | vertical skew factor | 
| Matrix2D Matrix2D::skew_x | ( | double | skew | ) | 
adds horizontal skew - see gf_mx2d_add_skew_x
| skew | horizontal skew factor | 
| Matrix2D Matrix2D::skew_y | ( | double | skew | ) | 
adds vertical skew - see gf_mx2d_add_skew_y
| skew | vertical skew factor | 
transforms a point with a matrix - see gf_mx2d_apply_point
| in | input point to transform | 
transforms a rectangle with a matrix - see gf_mx2d_apply_rect
| in | input rectangle to transform | 
| attribute double Matrix2D::xx | 
xx
| attribute double Matrix2D::xy | 
xy
| attribute double Matrix2D::tx | 
tx
ty
| attribute double Matrix2D::yx | 
yx
| attribute double Matrix2D::yy | 
yy
| attribute boolean Matrix2D::identity | 
matrix is identity
| attribute const boolean Matrix2D::is3D = false | 
indicates matrix is a 2D matrix