2006-12-10 05:33:38 +08:00
|
|
|
/* GIMP - The GNU Image Manipulation Program
|
2003-02-05 16:29:12 +08:00
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
*
|
|
|
|
* GimpText
|
|
|
|
* Copyright (C) 2002-2003 Sven Neumann <sven@gimp.org>
|
|
|
|
*
|
2009-01-18 06:28:01 +08:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
2003-02-05 16:29:12 +08:00
|
|
|
* it under the terms of the GNU General Public License as published by
|
2009-01-18 06:28:01 +08:00
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
2003-02-05 16:29:12 +08:00
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2018-07-12 05:27:07 +08:00
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
2003-02-05 16:29:12 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GIMP_TEXT_LAYOUT_H__
|
|
|
|
#define __GIMP_TEXT_LAYOUT_H__
|
|
|
|
|
|
|
|
|
|
|
|
#define GIMP_TYPE_TEXT_LAYOUT (gimp_text_layout_get_type ())
|
|
|
|
#define GIMP_TEXT_LAYOUT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_TEXT_LAYOUT, GimpTextLayout))
|
|
|
|
#define GIMP_IS_TEXT_LAYOUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_TEXT_LAYOUT))
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct _GimpTextLayoutClass GimpTextLayoutClass;
|
|
|
|
|
2008-11-04 07:44:19 +08:00
|
|
|
struct _GimpTextLayoutClass
|
|
|
|
{
|
|
|
|
GObjectClass parent_class;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2009-06-19 23:08:34 +08:00
|
|
|
GType gimp_text_layout_get_type (void) G_GNUC_CONST;
|
|
|
|
|
|
|
|
GimpTextLayout * gimp_text_layout_new (GimpText *text,
|
2011-03-18 09:31:20 +08:00
|
|
|
gdouble xres,
|
2013-08-30 23:16:44 +08:00
|
|
|
gdouble yres,
|
|
|
|
GError **error);
|
2009-06-19 23:08:34 +08:00
|
|
|
gboolean gimp_text_layout_get_size (GimpTextLayout *layout,
|
|
|
|
gint *width,
|
2018-04-26 02:31:11 +08:00
|
|
|
gint *height);
|
2009-06-19 23:08:34 +08:00
|
|
|
void gimp_text_layout_get_offsets (GimpTextLayout *layout,
|
|
|
|
gint *x,
|
|
|
|
gint *y);
|
|
|
|
void gimp_text_layout_get_resolution (GimpTextLayout *layout,
|
|
|
|
gdouble *xres,
|
|
|
|
gdouble *yres);
|
|
|
|
|
|
|
|
GimpText * gimp_text_layout_get_text (GimpTextLayout *layout);
|
|
|
|
PangoLayout * gimp_text_layout_get_pango_layout (GimpTextLayout *layout);
|
|
|
|
|
|
|
|
void gimp_text_layout_get_transform (GimpTextLayout *layout,
|
|
|
|
cairo_matrix_t *matrix);
|
|
|
|
|
|
|
|
void gimp_text_layout_transform_rect (GimpTextLayout *layout,
|
|
|
|
PangoRectangle *rect);
|
|
|
|
void gimp_text_layout_transform_point (GimpTextLayout *layout,
|
|
|
|
gdouble *x,
|
|
|
|
gdouble *y);
|
|
|
|
void gimp_text_layout_transform_distance (GimpTextLayout *layout,
|
|
|
|
gdouble *x,
|
|
|
|
gdouble *y);
|
|
|
|
|
|
|
|
void gimp_text_layout_untransform_rect (GimpTextLayout *layout,
|
|
|
|
PangoRectangle *rect);
|
|
|
|
void gimp_text_layout_untransform_point (GimpTextLayout *layout,
|
|
|
|
gdouble *x,
|
|
|
|
gdouble *y);
|
|
|
|
void gimp_text_layout_untransform_distance (GimpTextLayout *layout,
|
|
|
|
gdouble *x,
|
|
|
|
gdouble *y);
|
2003-02-05 16:29:12 +08:00
|
|
|
|
|
|
|
|
|
|
|
#endif /* __GIMP_TEXT_LAYOUT_H__ */
|