Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
pango-matrix.h
Go to the documentation of this file.
1/* Pango
2 * pango-matrix.h: Matrix manipulation routines
3 *
4 * Copyright (C) 2002, 2006 Red Hat Software
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
15 *
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
20 */
21
22#ifndef __PANGO_MATRIX_H__
23#define __PANGO_MATRIX_H__
24
25#include <glib.h>
26#include <glib-object.h>
27
29
31
32/**
33 * PangoMatrix:
34 * @xx: 1st component of the transformation matrix
35 * @xy: 2nd component of the transformation matrix
36 * @yx: 3rd component of the transformation matrix
37 * @yy: 4th component of the transformation matrix
38 * @x0: x translation
39 * @y0: y translation
40 *
41 * A `PangoMatrix` specifies a transformation between user-space
42 * and device coordinates.
43 *
44 * The transformation is given by
45 *
46 * ```
47 * x_device = x_user * matrix->xx + y_user * matrix->xy + matrix->x0;
48 * y_device = x_user * matrix->yx + y_user * matrix->yy + matrix->y0;
49 * ```
50 *
51 * Since: 1.6
52 */
54{
55 double xx;
56 double xy;
57 double yx;
58 double yy;
59 double x0;
60 double y0;
61};
62
63#define PANGO_TYPE_MATRIX (pango_matrix_get_type ())
64
65/**
66 * PANGO_MATRIX_INIT:
67 *
68 * Constant that can be used to initialize a `PangoMatrix` to
69 * the identity transform.
70 *
71 * ```
72 * PangoMatrix matrix = PANGO_MATRIX_INIT;
73 * pango_matrix_rotate (&matrix, 45.);
74 * ```
75 *
76 * Since: 1.6
77 **/
78#define PANGO_MATRIX_INIT { 1., 0., 0., 1., 0., 0. }
79
80/* for PangoRectangle */
81#include <pango/pango-types.h>
82
85
90
93 double tx,
94 double ty);
97 double scale_x,
98 double scale_y);
101 double degrees);
104 const PangoMatrix *new_matrix);
107 double *x,
108 double *y);
111 double *dx,
112 double *dy);
115 PangoRectangle *rect);
118 PangoRectangle *rect);
123 double *xscale, double *yscale);
126
127
129
130#endif /* __PANGO_MATRIX_H__ */
#define G_GNUC_PURE
Definition gmacros.h:287
#define G_END_DECLS
Definition gmacros.h:910
#define G_BEGIN_DECLS
Definition gmacros.h:909
#define G_GNUC_CONST
Definition gmacros.h:637
gsize GType
Definition gtype.h:427
typedefG_BEGIN_DECLS struct _PangoMatrix PangoMatrix
PANGO_AVAILABLE_IN_1_38 void pango_matrix_get_font_scale_factors(const PangoMatrix *matrix, double *xscale, double *yscale)
PANGO_AVAILABLE_IN_1_50 double pango_matrix_get_slant_ratio(const PangoMatrix *matrix) G_GNUC_PURE
PANGO_AVAILABLE_IN_1_6 GType pango_matrix_get_type(void) G_GNUC_CONST
PANGO_AVAILABLE_IN_1_6 void pango_matrix_free(PangoMatrix *matrix)
PANGO_AVAILABLE_IN_1_16 void pango_matrix_transform_rectangle(const PangoMatrix *matrix, PangoRectangle *rect)
PANGO_AVAILABLE_IN_1_6 void pango_matrix_translate(PangoMatrix *matrix, double tx, double ty)
PANGO_AVAILABLE_IN_1_6 void pango_matrix_rotate(PangoMatrix *matrix, double degrees)
PANGO_AVAILABLE_IN_1_16 void pango_matrix_transform_pixel_rectangle(const PangoMatrix *matrix, PangoRectangle *rect)
PANGO_AVAILABLE_IN_1_12 double pango_matrix_get_font_scale_factor(const PangoMatrix *matrix) G_GNUC_PURE
PANGO_AVAILABLE_IN_1_16 void pango_matrix_transform_distance(const PangoMatrix *matrix, double *dx, double *dy)
PANGO_AVAILABLE_IN_1_6 void pango_matrix_scale(PangoMatrix *matrix, double scale_x, double scale_y)
PANGO_AVAILABLE_IN_1_6 void pango_matrix_concat(PangoMatrix *matrix, const PangoMatrix *new_matrix)
PANGO_AVAILABLE_IN_1_16 void pango_matrix_transform_point(const PangoMatrix *matrix, double *x, double *y)
PANGO_AVAILABLE_IN_1_6 PangoMatrix * pango_matrix_copy(const PangoMatrix *matrix)
#define PANGO_AVAILABLE_IN_1_38
#define PANGO_AVAILABLE_IN_1_16
#define PANGO_AVAILABLE_IN_1_12
#define PANGO_AVAILABLE_IN_1_50
#define PANGO_AVAILABLE_IN_1_6