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

« back to all changes in this revision

Viewing changes to app/paint-funcs/paint-funcs.h

  • 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:
1
 
/* The GIMP -- an image manipulation program
 
1
/* GIMP - The GNU Image Manipulation Program
2
2
 * Copyright (C) 1995 Spencer Kimball and Peter Mattis
3
3
 *
4
4
 * This program is free software; you can redistribute it and/or modify
32
32
                             guint         w,
33
33
                             guint         bytes);
34
34
 
 
35
void  color_pixels_mask     (guchar       *dest,
 
36
                             const guchar *mask,
 
37
                             const guchar *color,
 
38
                             guint         w,
 
39
                             guint         bytes);
 
40
 
 
41
void  pattern_pixels_mask   (guchar       *dest,
 
42
                             const guchar *mask,
 
43
                             TempBuf      *pattern,
 
44
                             guint         w,
 
45
                             guint         bytes,
 
46
                             gint          x,
 
47
                             gint          y);
 
48
 
35
49
void  blend_pixels          (const guchar *src1,
36
50
                             const guchar *src2,
37
51
                             guchar       *dest,
78
92
                             guint         length,
79
93
                             guint         bytes);
80
94
 
81
 
void  component_pixels      (const guchar *src,
 
95
void  copy_component_pixels (const guchar *src,
82
96
                             guchar       *dest,
83
97
                             guint         length,
84
98
                             guint         bytes,
85
99
                             guint         pixel);
86
100
 
 
101
void  copy_color_pixels     (const guchar *src,
 
102
                             guchar       *dest,
 
103
                             guint         length,
 
104
                             guint         bytes);
 
105
 
87
106
/*  apply the mask data to the alpha channel of the pixel data  */
88
107
void  apply_mask_to_alpha_channel         (guchar       *src,
89
108
                                           const guchar *mask,
184
203
                                            const guchar *src2,
185
204
                                            guchar       *dest,
186
205
                                            const guchar *mask,
187
 
                                            guint          opacity,
 
206
                                            guint         opacity,
188
207
                                            const gint   *affect,
189
 
                                            guint          length,
190
 
                                            guint          bytes);
 
208
                                            guint         length,
 
209
                                            guint         bytes);
191
210
 
192
211
/*  combine indexed-alpha images with indexed-alpha images
193
212
 *  result is an indexed-alpha image.  use this for painting
197
216
                                             const guchar   *src2,
198
217
                                             guchar         *dest,
199
218
                                             const guchar   *mask,
200
 
                                             guint              opacity,
 
219
                                             guint           opacity,
201
220
                                             const gboolean *affect,
202
 
                                             guint             length,
203
 
                                             guint             bytes);
 
221
                                             guint           length,
 
222
                                             guint           bytes);
 
223
 
 
224
void combine_inten_a_and_indexed_pixels     (const guchar   *src1,
 
225
                                             const guchar   *src2,
 
226
                                             guchar         *dest,
 
227
                                             const guchar   *mask,
 
228
                                             const guchar   *cmap,
 
229
                                             guint           opacity,
 
230
                                             guint           length,
 
231
                                             guint           bytes);
204
232
 
205
233
/*  combine intensity with indexed, destination is
206
234
 *  intensity-alpha...use this for an indexed floating sel
210
238
                                            guchar       *dest,
211
239
                                            const guchar *mask,
212
240
                                            const guchar *cmap,
213
 
                                            guint          opacity,
214
 
                                            guint          length,
215
 
                                            guint          bytes);
 
241
                                            guint         opacity,
 
242
                                            guint         length,
 
243
                                            guint         bytes);
216
244
 
217
245
/*  combine RGB image with RGB or GRAY with GRAY
218
246
 *  destination is intensity-only...
221
249
                                            const guchar   *src2,
222
250
                                            guchar         *dest,
223
251
                                            const guchar   *mask,
224
 
                                            guint            opacity,
 
252
                                            guint           opacity,
225
253
                                            const gboolean *affect,
226
 
                                            guint            length,
 
254
                                            guint           length,
227
255
                                            guint           bytes);
228
256
 
229
257
/*  combine an RGBA or GRAYA image with an RGB or GRAY image
258
286
                                            const guchar   *src2,
259
287
                                            guchar         *dest,
260
288
                                            const guchar   *mask,
261
 
                                            guint            opacity,
 
289
                                            guint           opacity,
262
290
                                            const gboolean *affect,
263
291
                                            gboolean        mode_affect,
264
 
                                            guint            length,
265
 
                                            guint            bytes);
 
292
                                            guint           length,
 
293
                                            guint           bytes);
266
294
 
267
295
/*  combine a channel with intensity-alpha pixels based
268
296
 *  on some opacity, and a channel color...
272
300
                                              const guchar *channel,
273
301
                                              guchar       *dest,
274
302
                                              const guchar *col,
275
 
                                              guint            opacity,
276
 
                                              guint            length,
277
 
                                              guint            bytes);
 
303
                                              guint         opacity,
 
304
                                              guint         length,
 
305
                                              guint         bytes);
278
306
 
279
307
void  combine_inten_a_and_channel_selection_pixels(const guchar *src,
280
308
                                                   const guchar *channel,
293
321
                                           const guchar *bg,
294
322
                                           gboolean      cut,
295
323
                                           guint         length,
296
 
                                           guint         bytes,
297
 
                                           gboolean      has_alpha);
 
324
                                           guint         src_bytes,
 
325
                                           guint         dest_bytes);
298
326
 
299
327
/*  extract information from indexed pixels based on
300
328
 *  a mask.
306
334
                                           const guchar *bg,
307
335
                                           gboolean      cut,
308
336
                                           guint         length,
309
 
                                           guint         bytes,
310
 
                                           gboolean      has_alpha);
 
337
                                           guint         src_bytes,
 
338
                                           guint         dest_bytes);
311
339
 
312
340
 
313
341
/*  Region functions  */
349
377
                                           PixelRegion *mask,
350
378
                                           PixelRegion *dest);
351
379
 
352
 
void  extract_from_region                 (PixelRegion *src,
353
 
                                           PixelRegion *dest,
354
 
                                           PixelRegion *mask,
355
 
                                           guchar      *cmap,
356
 
                                           guchar      *bg,
357
 
                                           gint         type,
358
 
                                           gboolean     has_alpha,
359
 
                                           gboolean     cut);
 
380
void  extract_from_region                 (PixelRegion       *src,
 
381
                                           PixelRegion       *dest,
 
382
                                           PixelRegion       *mask,
 
383
                                           const guchar      *cmap,
 
384
                                           const guchar      *bg,
 
385
                                           GimpImageBaseType  type,
 
386
                                           gboolean           cut);
360
387
 
361
388
 
362
389
void  convolve_region                     (PixelRegion         *srcR,
363
390
                                           PixelRegion         *destR,
364
 
                                           gfloat              *matrix,
 
391
                                           const gfloat        *matrix,
365
392
                                           gint                 size,
366
393
                                           gdouble              divisor,
367
394
                                           GimpConvolutionType  mode,
377
404
 
378
405
void  border_region                       (PixelRegion *src,
379
406
                                           gint16       xradius,
380
 
                                           gint16       yradius);
381
 
 
382
 
void  scale_region                        (PixelRegion           *srcPR,
383
 
                                           PixelRegion           *destPR,
384
 
                                           GimpInterpolationType  interpolation,
385
 
                                           GimpProgressFunc       progress_callback,
386
 
                                           gpointer               progress_data);
387
 
 
388
 
void  subsample_region                    (PixelRegion *srcPR,
389
 
                                           PixelRegion *destPR,
390
 
                                           gint         subsample);
391
 
 
392
 
gfloat shapeburst_region                  (PixelRegion           *srcPR,
393
 
                                           PixelRegion           *distPR,
394
 
                                           GimpProgressFunc       progress_callback,
395
 
                                           gpointer               progress_data);
396
 
 
397
 
void  thin_region                         (PixelRegion *src,
398
 
                                           gint16       xradius,
399
 
                                           gint16       yradius,
400
 
                                           gboolean     edge_lock);
401
 
 
402
 
void  fatten_region                       (PixelRegion *src,
403
 
                                           gint16       xradius,
404
 
                                           gint16       yradius);
 
407
                                           gint16       yradius,
 
408
                                           gboolean     feather,
 
409
                                           gboolean     edge_lock);
 
410
 
 
411
gfloat shapeburst_region                  (PixelRegion      *srcPR,
 
412
                                           PixelRegion      *distPR,
 
413
                                           GimpProgressFunc  progress_callback,
 
414
                                           gpointer          progress_data);
 
415
 
 
416
void  thin_region                         (PixelRegion *region,
 
417
                                           gint16       xradius,
 
418
                                           gint16       yradius,
 
419
                                           gboolean     edge_lock);
 
420
 
 
421
void  fatten_region                       (PixelRegion *region,
 
422
                                           gint16       xradius,
 
423
                                           gint16       yradius);
 
424
 
 
425
void  smooth_region                       (PixelRegion *region);
 
426
void  erode_region                        (PixelRegion *region);
 
427
void  dilate_region                       (PixelRegion *region);
405
428
 
406
429
void  swap_region                         (PixelRegion *src,
407
430
                                           PixelRegion *dest);
427
450
                                           PixelRegion *dest,
428
451
                                           guint        pixel);
429
452
 
 
453
/*  Copy the color bytes (without alpha channel) to a src_bytes-1 - byte region  */
 
454
void  copy_color                          (PixelRegion *src,
 
455
                                           PixelRegion *dest);
 
456
 
430
457
void  initial_region                      (PixelRegion    *src,
431
458
                                           PixelRegion    *dest,
432
459
                                           PixelRegion    *mask,