Matrix package:gi-pango

A PangoMatrix specifies a transformation between user-space and device coordinates. The transformation is given by
x_device = x_user * matrix->xx + y_user * matrix->xy + matrix->x0;
y_device = x_user * matrix->yx + y_user * matrix->yy + matrix->y0;
Since: 1.6
Memory-managed wrapper type.
Changes the transformation represented by matrix to be the transformation given by first applying transformation given by newMatrix then applying the original transformation. Since: 1.6
Copies a PangoMatrix. Since: 1.6
Free a PangoMatrix. Since: 1.6
Returns the scale factor of a matrix on the height of the font. That is, the scale factor in the direction perpendicular to the vector that the X coordinate is mapped to. If the scale in the X coordinate is needed as well, use matrixGetFontScaleFactors. Since: 1.12
Calculates the scale factor of a matrix on the width and height of the font. That is, xscale is the scale factor in the direction of the X coordinate, and yscale is the scale factor in the direction perpendicular to the vector that the X coordinate is mapped to. Note that output numbers will always be non-negative. Since: 1.38
Gets the slant ratio of a matrix. For a simple shear matrix in the form: 1 λ 0 1 this is simply λ. Since: 1.50
Changes the transformation represented by matrix to be the transformation given by first rotating by degrees degrees counter-clockwise then applying the original transformation. Since: 1.6
Changes the transformation represented by matrix to be the transformation given by first scaling by sx in the X direction and sy in the Y direction then applying the original transformation. Since: 1.6
Transforms the distance vector (dx,dy) by matrix. This is similar to matrixTransformPoint, except that the translation components of the transformation are ignored. The calculation of the returned vector is as follows:
dx2 = dx1 * xx + dy1 * xy;
dy2 = dx1 * yx + dy1 * yy;
Affine transformations are position invariant, so the same vector always transforms to the same vector. If (x1,y1) transforms to (x2,y2) then (x1+dx1,y1+dy1) will transform to (x1+dx2,y1+dy2) for all values of x1 and x2. Since: 1.16
First transforms the rect using matrix, then calculates the bounding box of the transformed rectangle. This function is useful for example when you want to draw a rotated pangoLayout to an image buffer, and want to know how large the image should be and how much you should shift the layout when rendering. For better accuracy, you should use matrixTransformRectangle on original rectangle in Pango units and convert to pixels afterward using [funcextentsToPixels]'s first argument. Since: 1.16
Transforms the point (x, y) by matrix. Since: 1.16
Changes the transformation represented by matrix to be the transformation given by first translating by (tx, ty) then applying the original transformation. Since: 1.6
Gets the transformation matrix that will be applied when rendering with this context. See contextSetMatrix. Since: 1.6
Sets the transformation matrix that will be applied when rendering with this context. Note that reported metrics are in the user space coordinates before the application of the matrix, not device-space coordinates after the application of the matrix. So, they don't scale with the matrix, though they may change slightly for different matrices, depending on how the text is fit to the pixel grid. Since: 1.6
Gets the transformation matrix that will be applied when rendering. See rendererSetMatrix. Since: 1.8
Sets the transformation matrix that will be applied when rendering. Since: 1.8
Get the value of the “x0” field. When overloading is enabled, this is equivalent to
get matrix #x0
Get the value of the “xx” field. When overloading is enabled, this is equivalent to
get matrix #xx
Get the value of the “xy” field. When overloading is enabled, this is equivalent to
get matrix #xy
Get the value of the “y0” field. When overloading is enabled, this is equivalent to
get matrix #y0
Get the value of the “yx” field. When overloading is enabled, this is equivalent to
get matrix #yx
Get the value of the “yy” field. When overloading is enabled, this is equivalent to
get matrix #yy