~ubuntu-branches/ubuntu/jaunty/gimp/jaunty-security

« back to all changes in this revision

Viewing changes to libgimp/gimptexttool_pdb.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2007-05-02 16:33:03 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070502163303-bvzhjzbpw8qglc4y
Tags: 2.3.16-1ubuntu1
* Resynchronized with Debian, remaining Ubuntu changes:
  - debian/rules: i18n magic.
* debian/control.in:
  - Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
* debian/patches/02_help-message.patch,
  debian/patches/03_gimp.desktop.in.in.patch,
  debian/patches/10_dont_show_wizard.patch: updated.
* debian/patches/04_composite-signedness.patch,
  debian/patches/05_add-letter-spacing.patch: dropped, used upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 * Boston, MA 02111-1307, USA.
20
20
 */
21
21
 
22
 
/* NOTE: This file is autogenerated by pdbgen.pl */
 
22
/* NOTE: This file is auto-generated by pdbgen.pl */
23
23
 
24
24
#include "config.h"
25
25
 
26
26
#include "gimp.h"
 
27
#undef GIMP_DISABLE_DEPRECATED
 
28
#undef __GIMP_TEXT_TOOL_PDB_H__
 
29
#include "gimptexttool_pdb.h"
27
30
 
28
31
/**
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.
54
60
 *
55
61
 * Returns: The new text layer or -1 if no layer was created.
56
62
 */
57
63
gint32
58
64
gimp_text_fontname (gint32        image_ID,
59
 
                    gint32        drawable_ID,
60
 
                    gdouble       x,
61
 
                    gdouble       y,
62
 
                    const gchar  *text,
63
 
                    gint          border,
64
 
                    gboolean      antialias,
65
 
                    gdouble       size,
66
 
                    GimpSizeType  size_type,
67
 
                    const gchar  *fontname)
 
65
                    gint32        drawable_ID,
 
66
                    gdouble       x,
 
67
                    gdouble       y,
 
68
                    const gchar  *text,
 
69
                    gint          border,
 
70
                    gboolean      antialias,
 
71
                    gdouble       size,
 
72
                    GimpSizeType  size_type,
 
73
                    const gchar  *fontname)
68
74
{
69
75
  GimpParam *return_vals;
70
76
  gint nreturn_vals;
71
77
  gint32 text_layer_ID = -1;
72
78
 
73
 
  return_vals = gimp_run_procedure ("gimp_text_fontname",
74
 
                                    &nreturn_vals,
75
 
                                    GIMP_PDB_IMAGE, image_ID,
76
 
                                    GIMP_PDB_DRAWABLE, drawable_ID,
77
 
                                    GIMP_PDB_FLOAT, x,
78
 
                                    GIMP_PDB_FLOAT, y,
79
 
                                    GIMP_PDB_STRING, text,
80
 
                                    GIMP_PDB_INT32, border,
81
 
                                    GIMP_PDB_INT32, antialias,
82
 
                                    GIMP_PDB_FLOAT, size,
83
 
                                    GIMP_PDB_INT32, size_type,
84
 
                                    GIMP_PDB_STRING, fontname,
85
 
                                    GIMP_PDB_END);
 
79
  return_vals = gimp_run_procedure ("gimp-text-fontname",
 
80
                                    &nreturn_vals,
 
81
                                    GIMP_PDB_IMAGE, image_ID,
 
82
                                    GIMP_PDB_DRAWABLE, drawable_ID,
 
83
                                    GIMP_PDB_FLOAT, x,
 
84
                                    GIMP_PDB_FLOAT, y,
 
85
                                    GIMP_PDB_STRING, text,
 
86
                                    GIMP_PDB_INT32, border,
 
87
                                    GIMP_PDB_INT32, antialias,
 
88
                                    GIMP_PDB_FLOAT, size,
 
89
                                    GIMP_PDB_INT32, size_type,
 
90
                                    GIMP_PDB_STRING, fontname,
 
91
                                    GIMP_PDB_END);
86
92
 
87
93
  if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
88
94
    text_layer_ID = return_vals[1].data.d_layer;
107
113
 *
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
 
120
 * into account.
111
121
 *
112
122
 * Returns: TRUE on success.
113
123
 */
114
124
gboolean
115
125
gimp_text_get_extents_fontname (const gchar  *text,
116
 
                                gdouble       size,
117
 
                                GimpSizeType  size_type,
118
 
                                const gchar  *fontname,
119
 
                                gint         *width,
120
 
                                gint         *height,
121
 
                                gint         *ascent,
122
 
                                gint         *descent)
 
126
                                gdouble       size,
 
127
                                GimpSizeType  size_type,
 
128
                                const gchar  *fontname,
 
129
                                gint         *width,
 
130
                                gint         *height,
 
131
                                gint         *ascent,
 
132
                                gint         *descent)
123
133
{
124
134
  GimpParam *return_vals;
125
135
  gint nreturn_vals;
126
136
  gboolean success = TRUE;
127
137
 
128
 
  return_vals = gimp_run_procedure ("gimp_text_get_extents_fontname",
129
 
                                    &nreturn_vals,
130
 
                                    GIMP_PDB_STRING, text,
131
 
                                    GIMP_PDB_FLOAT, size,
132
 
                                    GIMP_PDB_INT32, size_type,
133
 
                                    GIMP_PDB_STRING, fontname,
134
 
                                    GIMP_PDB_END);
 
138
  return_vals = gimp_run_procedure ("gimp-text-get-extents-fontname",
 
139
                                    &nreturn_vals,
 
140
                                    GIMP_PDB_STRING, text,
 
141
                                    GIMP_PDB_FLOAT, size,
 
142
                                    GIMP_PDB_INT32, size_type,
 
143
                                    GIMP_PDB_STRING, fontname,
 
144
                                    GIMP_PDB_END);
135
145
 
136
146
  *width = 0;
137
147
  *height = 0;
179
189
 */
180
190
gint32
181
191
gimp_text (gint32        image_ID,
182
 
           gint32        drawable_ID,
183
 
           gdouble       x,
184
 
           gdouble       y,
185
 
           const gchar  *text,
186
 
           gint          border,
187
 
           gboolean      antialias,
188
 
           gdouble       size,
189
 
           GimpSizeType  size_type,
190
 
           const gchar  *foundry,
191
 
           const gchar  *family,
192
 
           const gchar  *weight,
193
 
           const gchar  *slant,
194
 
           const gchar  *set_width,
195
 
           const gchar  *spacing,
196
 
           const gchar  *registry,
197
 
           const gchar  *encoding)
 
192
           gint32        drawable_ID,
 
193
           gdouble       x,
 
194
           gdouble       y,
 
195
           const gchar  *text,
 
196
           gint          border,
 
197
           gboolean      antialias,
 
198
           gdouble       size,
 
199
           GimpSizeType  size_type,
 
200
           const gchar  *foundry,
 
201
           const gchar  *family,
 
202
           const gchar  *weight,
 
203
           const gchar  *slant,
 
204
           const gchar  *set_width,
 
205
           const gchar  *spacing,
 
206
           const gchar  *registry,
 
207
           const gchar  *encoding)
198
208
{
199
209
  GimpParam *return_vals;
200
210
  gint nreturn_vals;
201
211
  gint32 text_layer_ID = -1;
202
212
 
203
 
  return_vals = gimp_run_procedure ("gimp_text",
204
 
                                    &nreturn_vals,
205
 
                                    GIMP_PDB_IMAGE, image_ID,
206
 
                                    GIMP_PDB_DRAWABLE, drawable_ID,
207
 
                                    GIMP_PDB_FLOAT, x,
208
 
                                    GIMP_PDB_FLOAT, y,
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,
222
 
                                    GIMP_PDB_END);
 
213
  return_vals = gimp_run_procedure ("gimp-text",
 
214
                                    &nreturn_vals,
 
215
                                    GIMP_PDB_IMAGE, image_ID,
 
216
                                    GIMP_PDB_DRAWABLE, drawable_ID,
 
217
                                    GIMP_PDB_FLOAT, x,
 
218
                                    GIMP_PDB_FLOAT, y,
 
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,
 
232
                                    GIMP_PDB_END);
223
233
 
224
234
  if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
225
235
    text_layer_ID = return_vals[1].data.d_layer;
254
264
 */
255
265
gboolean
256
266
gimp_text_get_extents (const gchar  *text,
257
 
                       gdouble       size,
258
 
                       GimpSizeType  size_type,
259
 
                       const gchar  *foundry,
260
 
                       const gchar  *family,
261
 
                       const gchar  *weight,
262
 
                       const gchar  *slant,
263
 
                       const gchar  *set_width,
264
 
                       const gchar  *spacing,
265
 
                       const gchar  *registry,
266
 
                       const gchar  *encoding,
267
 
                       gint         *width,
268
 
                       gint         *height,
269
 
                       gint         *ascent,
270
 
                       gint         *descent)
 
267
                       gdouble       size,
 
268
                       GimpSizeType  size_type,
 
269
                       const gchar  *foundry,
 
270
                       const gchar  *family,
 
271
                       const gchar  *weight,
 
272
                       const gchar  *slant,
 
273
                       const gchar  *set_width,
 
274
                       const gchar  *spacing,
 
275
                       const gchar  *registry,
 
276
                       const gchar  *encoding,
 
277
                       gint         *width,
 
278
                       gint         *height,
 
279
                       gint         *ascent,
 
280
                       gint         *descent)
271
281
{
272
282
  GimpParam *return_vals;
273
283
  gint nreturn_vals;
274
284
  gboolean success = TRUE;
275
285
 
276
 
  return_vals = gimp_run_procedure ("gimp_text_get_extents",
277
 
                                    &nreturn_vals,
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,
289
 
                                    GIMP_PDB_END);
 
286
  return_vals = gimp_run_procedure ("gimp-text-get-extents",
 
287
                                    &nreturn_vals,
 
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,
 
299
                                    GIMP_PDB_END);
290
300
 
291
301
  *width = 0;
292
302
  *height = 0;