19
19
* Boston, MA 02111-1307, USA.
22
/* NOTE: This file is autogenerated by pdbgen.pl */
22
/* NOTE: This file is auto-generated by pdbgen.pl */
24
24
#include "config.h"
27
#undef GIMP_DISABLE_DEPRECATED
28
#undef __GIMP_TEXT_TOOL_PDB_H__
29
#include "gimptexttool_pdb.h"
29
32
* gimp_text_fontname:
50
53
* floating selection attached to the drawable. If the drawable
51
54
* parameter is not valid (-1), the text will appear as a new layer.
52
55
* Finally, a border can be specified around the final rendered text.
53
* The border is measured in pixels.
56
* The border is measured in pixels. Parameter size-type is not used
57
* and is currently ignored. If you need to display a font in points,
58
* divide the size in points by 72.0 and multiply it by the image's
59
* vertical resolution.
55
61
* Returns: The new text layer or -1 if no layer was created.
58
64
gimp_text_fontname (gint32 image_ID,
66
GimpSizeType size_type,
67
const gchar *fontname)
72
GimpSizeType size_type,
73
const gchar *fontname)
69
75
GimpParam *return_vals;
71
77
gint32 text_layer_ID = -1;
73
return_vals = gimp_run_procedure ("gimp_text_fontname",
75
GIMP_PDB_IMAGE, image_ID,
76
GIMP_PDB_DRAWABLE, drawable_ID,
79
GIMP_PDB_STRING, text,
80
GIMP_PDB_INT32, border,
81
GIMP_PDB_INT32, antialias,
83
GIMP_PDB_INT32, size_type,
84
GIMP_PDB_STRING, fontname,
79
return_vals = gimp_run_procedure ("gimp-text-fontname",
81
GIMP_PDB_IMAGE, image_ID,
82
GIMP_PDB_DRAWABLE, drawable_ID,
85
GIMP_PDB_STRING, text,
86
GIMP_PDB_INT32, border,
87
GIMP_PDB_INT32, antialias,
89
GIMP_PDB_INT32, size_type,
90
GIMP_PDB_STRING, fontname,
87
93
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
88
94
text_layer_ID = return_vals[1].data.d_layer;
108
114
* This tool returns the width and height of a bounding box for the
109
115
* specified text string with the specified font information. Ascent
110
* and descent for the specified font are returned as well.
116
* and descent for the specified font are returned as well. Parameter
117
* size-type is not used and is currently ignored. If you need to
118
* display a font in points, divide the size in points by 72.0 and
119
* multiply it by the vertical resolution of the image you are taking
112
122
* Returns: TRUE on success.
115
125
gimp_text_get_extents_fontname (const gchar *text,
117
GimpSizeType size_type,
118
const gchar *fontname,
127
GimpSizeType size_type,
128
const gchar *fontname,
124
134
GimpParam *return_vals;
125
135
gint nreturn_vals;
126
136
gboolean success = TRUE;
128
return_vals = gimp_run_procedure ("gimp_text_get_extents_fontname",
130
GIMP_PDB_STRING, text,
131
GIMP_PDB_FLOAT, size,
132
GIMP_PDB_INT32, size_type,
133
GIMP_PDB_STRING, fontname,
138
return_vals = gimp_run_procedure ("gimp-text-get-extents-fontname",
140
GIMP_PDB_STRING, text,
141
GIMP_PDB_FLOAT, size,
142
GIMP_PDB_INT32, size_type,
143
GIMP_PDB_STRING, fontname,
181
191
gimp_text (gint32 image_ID,
189
GimpSizeType size_type,
190
const gchar *foundry,
194
const gchar *set_width,
195
const gchar *spacing,
196
const gchar *registry,
197
const gchar *encoding)
199
GimpSizeType size_type,
200
const gchar *foundry,
204
const gchar *set_width,
205
const gchar *spacing,
206
const gchar *registry,
207
const gchar *encoding)
199
209
GimpParam *return_vals;
200
210
gint nreturn_vals;
201
211
gint32 text_layer_ID = -1;
203
return_vals = gimp_run_procedure ("gimp_text",
205
GIMP_PDB_IMAGE, image_ID,
206
GIMP_PDB_DRAWABLE, drawable_ID,
209
GIMP_PDB_STRING, text,
210
GIMP_PDB_INT32, border,
211
GIMP_PDB_INT32, antialias,
212
GIMP_PDB_FLOAT, size,
213
GIMP_PDB_INT32, size_type,
214
GIMP_PDB_STRING, foundry,
215
GIMP_PDB_STRING, family,
216
GIMP_PDB_STRING, weight,
217
GIMP_PDB_STRING, slant,
218
GIMP_PDB_STRING, set_width,
219
GIMP_PDB_STRING, spacing,
220
GIMP_PDB_STRING, registry,
221
GIMP_PDB_STRING, encoding,
213
return_vals = gimp_run_procedure ("gimp-text",
215
GIMP_PDB_IMAGE, image_ID,
216
GIMP_PDB_DRAWABLE, drawable_ID,
219
GIMP_PDB_STRING, text,
220
GIMP_PDB_INT32, border,
221
GIMP_PDB_INT32, antialias,
222
GIMP_PDB_FLOAT, size,
223
GIMP_PDB_INT32, size_type,
224
GIMP_PDB_STRING, foundry,
225
GIMP_PDB_STRING, family,
226
GIMP_PDB_STRING, weight,
227
GIMP_PDB_STRING, slant,
228
GIMP_PDB_STRING, set_width,
229
GIMP_PDB_STRING, spacing,
230
GIMP_PDB_STRING, registry,
231
GIMP_PDB_STRING, encoding,
224
234
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
225
235
text_layer_ID = return_vals[1].data.d_layer;
256
266
gimp_text_get_extents (const gchar *text,
258
GimpSizeType size_type,
259
const gchar *foundry,
263
const gchar *set_width,
264
const gchar *spacing,
265
const gchar *registry,
266
const gchar *encoding,
268
GimpSizeType size_type,
269
const gchar *foundry,
273
const gchar *set_width,
274
const gchar *spacing,
275
const gchar *registry,
276
const gchar *encoding,
272
282
GimpParam *return_vals;
273
283
gint nreturn_vals;
274
284
gboolean success = TRUE;
276
return_vals = gimp_run_procedure ("gimp_text_get_extents",
278
GIMP_PDB_STRING, text,
279
GIMP_PDB_FLOAT, size,
280
GIMP_PDB_INT32, size_type,
281
GIMP_PDB_STRING, foundry,
282
GIMP_PDB_STRING, family,
283
GIMP_PDB_STRING, weight,
284
GIMP_PDB_STRING, slant,
285
GIMP_PDB_STRING, set_width,
286
GIMP_PDB_STRING, spacing,
287
GIMP_PDB_STRING, registry,
288
GIMP_PDB_STRING, encoding,
286
return_vals = gimp_run_procedure ("gimp-text-get-extents",
288
GIMP_PDB_STRING, text,
289
GIMP_PDB_FLOAT, size,
290
GIMP_PDB_INT32, size_type,
291
GIMP_PDB_STRING, foundry,
292
GIMP_PDB_STRING, family,
293
GIMP_PDB_STRING, weight,
294
GIMP_PDB_STRING, slant,
295
GIMP_PDB_STRING, set_width,
296
GIMP_PDB_STRING, spacing,
297
GIMP_PDB_STRING, registry,
298
GIMP_PDB_STRING, encoding,