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

« back to all changes in this revision

Viewing changes to app/core/gimpgradient.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
23
23
#include "gimpdata.h"
24
24
 
25
25
 
26
 
#define GIMP_GRADIENT_FILE_EXTENSION       ".ggr"
27
 
#define GIMP_GRADIENT_SVG_FILE_EXTENSION   ".svg"
28
 
 
29
 
#define GIMP_GRADIENT_DEFAULT_SAMPLE_SIZE  40
 
26
#define GIMP_GRADIENT_DEFAULT_SAMPLE_SIZE 40
30
27
 
31
28
 
32
29
struct _GimpGradientSegment
33
30
{
34
31
  gdouble                  left, middle, right;
 
32
 
 
33
  GimpGradientColor        left_color_type;
35
34
  GimpRGB                  left_color;
 
35
  GimpGradientColor        right_color_type;
36
36
  GimpRGB                  right_color;
 
37
 
37
38
  GimpGradientSegmentType  type;          /*  Segment's blending function  */
38
39
  GimpGradientSegmentColor color;         /*  Segment's coloring type      */
39
40
 
57
58
  GimpData             parent_instance;
58
59
 
59
60
  GimpGradientSegment *segments;
60
 
 
61
 
  /*< private >*/
62
 
  GimpGradientSegment *last_visited;
63
61
};
64
62
 
65
63
struct _GimpGradientClass
68
66
};
69
67
 
70
68
 
71
 
GType                 gimp_gradient_get_type         (void) G_GNUC_CONST;
72
 
 
73
 
GimpData            * gimp_gradient_new              (const gchar   *name,
74
 
                                                      gboolean       stingy_memory_use);
75
 
GimpData            * gimp_gradient_get_standard     (void);
76
 
 
77
 
void                  gimp_gradient_get_color_at     (GimpGradient  *gradient,
78
 
                                                      gdouble        pos,
79
 
                                                      gboolean       reverse,
80
 
                                                      GimpRGB       *color);
81
 
GimpGradientSegment * gimp_gradient_get_segment_at   (GimpGradient  *grad,
82
 
                                                      gdouble        pos);
 
69
GType                 gimp_gradient_get_type       (void) G_GNUC_CONST;
 
70
 
 
71
GimpData            * gimp_gradient_new            (const gchar   *name);
 
72
GimpData            * gimp_gradient_get_standard   (void);
 
73
 
 
74
GimpGradientSegment * gimp_gradient_get_color_at   (GimpGradient        *gradient,
 
75
                                                    GimpContext         *context,
 
76
                                                    GimpGradientSegment *seg,
 
77
                                                    gdouble              pos,
 
78
                                                    gboolean             reverse,
 
79
                                                    GimpRGB             *color);
 
80
GimpGradientSegment * gimp_gradient_get_segment_at (GimpGradient  *grad,
 
81
                                                    gdouble        pos);
 
82
 
 
83
gboolean          gimp_gradient_has_fg_bg_segments (GimpGradient  *gradient);
 
84
GimpGradient    * gimp_gradient_flatten            (GimpGradient  *gradient,
 
85
                                                    GimpContext   *context);
83
86
 
84
87
 
85
88
/*  gradient segment functions  */
94
97
void                  gimp_gradient_segments_free     (GimpGradientSegment *seg);
95
98
 
96
99
void    gimp_gradient_segment_split_midpoint  (GimpGradient         *gradient,
 
100
                                               GimpContext          *context,
97
101
                                               GimpGradientSegment  *lseg,
98
102
                                               GimpGradientSegment **newl,
99
103
                                               GimpGradientSegment **newr);
100
104
void    gimp_gradient_segment_split_uniform   (GimpGradient         *gradient,
 
105
                                               GimpContext          *context,
101
106
                                               GimpGradientSegment  *lseg,
102
107
                                               gint                  parts,
103
108
                                               GimpGradientSegment **newl,
121
126
                                               GimpGradientSegment  *seg,
122
127
                                               const GimpRGB        *color);
123
128
 
 
129
 
 
130
GimpGradientColor
 
131
gimp_gradient_segment_get_left_color_type     (GimpGradient         *gradient,
 
132
                                               GimpGradientSegment  *seg);
 
133
 
 
134
void
 
135
gimp_gradient_segment_set_left_color_type     (GimpGradient         *gradient,
 
136
                                               GimpGradientSegment  *seg,
 
137
                                               GimpGradientColor     color_type);
 
138
 
 
139
 
 
140
GimpGradientColor
 
141
gimp_gradient_segment_get_right_color_type    (GimpGradient         *gradient,
 
142
                                               GimpGradientSegment  *seg);
 
143
 
 
144
void
 
145
gimp_gradient_segment_set_right_color_type    (GimpGradient         *gradient,
 
146
                                               GimpGradientSegment  *seg,
 
147
                                               GimpGradientColor     color_type);
 
148
 
 
149
 
124
150
/* Position Setting/Getting Routines */
125
151
/* (Setters return the position after it was set) */
126
152
gdouble gimp_gradient_segment_get_left_pos    (GimpGradient         *gradient,
193
219
 
194
220
void    gimp_gradient_segment_range_split_midpoint
195
221
                                              (GimpGradient         *gradient,
 
222
                                               GimpContext          *context,
196
223
                                               GimpGradientSegment  *start_seg,
197
224
                                               GimpGradientSegment  *end_seg,
198
225
                                               GimpGradientSegment **final_start_seg,
200
227
 
201
228
void    gimp_gradient_segment_range_split_uniform
202
229
                                              (GimpGradient         *gradient,
 
230
                                               GimpContext          *context,
203
231
                                               GimpGradientSegment  *start_seg,
204
232
                                               GimpGradientSegment  *end_seg,
205
233
                                               gint                  parts,