38
39
GimpObject parent_instance;
40
gint ID; /* unique instance ID */
42
GimpCoords start_coords; /* starting coords (for undo only) */
44
GimpCoords cur_coords; /* current coords */
45
GimpCoords last_coords; /* last coords */
47
GimpVector2 last_paint; /* last point that was painted */
49
gdouble distance; /* distance traveled by brush */
50
gdouble pixel_dist; /* distance in pixels */
52
gint x1, y1; /* undo extents in image coords */
53
gint x2, y2; /* undo extents in image coords */
55
gboolean use_pressure; /* look at coords->pressure */
57
TileManager *undo_tiles; /* tiles which have been modified */
58
TileManager *canvas_tiles; /* the buffer to paint the mask to */
60
TempBuf *orig_buf; /* the unmodified drawable pixels */
61
TempBuf *canvas_buf; /* the buffer to paint pixels to */
41
gint ID; /* unique instance ID */
43
gchar *undo_desc; /* undo description */
45
GimpCoords start_coords; /* starting coords (for undo only) */
47
GimpCoords cur_coords; /* current coords */
48
GimpCoords last_coords; /* last coords */
50
GimpVector2 last_paint; /* last point that was painted */
52
gdouble distance; /* distance traveled by brush */
53
gdouble pixel_dist; /* distance in pixels */
55
gint x1, y1; /* undo extents in image coords */
56
gint x2, y2; /* undo extents in image coords */
58
gboolean use_pressure; /* look at coords->pressure */
59
gboolean use_saved_proj; /* keep the unmodified proj around */
61
TileManager *undo_tiles; /* tiles which have been modified */
62
TileManager *saved_proj_tiles; /* proj tiles which have been modified */
63
TileManager *canvas_tiles; /* the buffer to paint the mask to */
65
TempBuf *orig_buf; /* the unmodified drawable pixels */
66
TempBuf *orig_proj_buf; /* the unmodified projection pixels */
67
TempBuf *canvas_buf; /* the buffer to paint pixels to */
65
70
struct _GimpPaintCoreClass
67
72
GimpObjectClass parent_class;
69
74
/* virtual functions */
70
gboolean (* start) (GimpPaintCore *core,
71
GimpDrawable *drawable,
72
GimpPaintOptions *paint_options,
75
gboolean (* pre_paint) (GimpPaintCore *core,
76
GimpDrawable *drawable,
77
GimpPaintOptions *paint_options,
78
GimpPaintState paint_state,
80
void (* paint) (GimpPaintCore *core,
81
GimpDrawable *drawable,
82
GimpPaintOptions *paint_options,
83
GimpPaintState paint_state,
85
void (* post_paint) (GimpPaintCore *core,
86
GimpDrawable *drawable,
87
GimpPaintOptions *paint_options,
88
GimpPaintState paint_state,
91
void (* interpolate) (GimpPaintCore *core,
92
GimpDrawable *drawable,
93
GimpPaintOptions *paint_options,
96
TempBuf * (* get_paint_area) (GimpPaintCore *core,
97
GimpDrawable *drawable,
98
GimpPaintOptions *paint_options);
100
gboolean (* push_undo) (GimpPaintCore *core,
102
const gchar *undo_desc);
75
gboolean (* start) (GimpPaintCore *core,
76
GimpDrawable *drawable,
77
GimpPaintOptions *paint_options,
81
gboolean (* pre_paint) (GimpPaintCore *core,
82
GimpDrawable *drawable,
83
GimpPaintOptions *paint_options,
84
GimpPaintState paint_state,
86
void (* paint) (GimpPaintCore *core,
87
GimpDrawable *drawable,
88
GimpPaintOptions *paint_options,
89
GimpPaintState paint_state,
91
void (* post_paint) (GimpPaintCore *core,
92
GimpDrawable *drawable,
93
GimpPaintOptions *paint_options,
94
GimpPaintState paint_state,
97
void (* interpolate) (GimpPaintCore *core,
98
GimpDrawable *drawable,
99
GimpPaintOptions *paint_options,
102
TempBuf * (* get_paint_area) (GimpPaintCore *core,
103
GimpDrawable *drawable,
104
GimpPaintOptions *paint_options);
106
GimpUndo * (* push_undo) (GimpPaintCore *core,
108
const gchar *undo_desc);
106
GType gimp_paint_core_get_type (void) G_GNUC_CONST;
108
void gimp_paint_core_paint (GimpPaintCore *core,
109
GimpDrawable *drawable,
110
GimpPaintOptions *paint_options,
111
GimpPaintState state,
114
gboolean gimp_paint_core_start (GimpPaintCore *core,
115
GimpDrawable *drawable,
116
GimpPaintOptions *paint_options,
118
void gimp_paint_core_finish (GimpPaintCore *core,
119
GimpDrawable *drawable);
120
void gimp_paint_core_cancel (GimpPaintCore *core,
121
GimpDrawable *drawable);
122
void gimp_paint_core_cleanup (GimpPaintCore *core);
124
void gimp_paint_core_interpolate (GimpPaintCore *core,
125
GimpDrawable *drawable,
126
GimpPaintOptions *paint_options,
112
GType gimp_paint_core_get_type (void) G_GNUC_CONST;
114
void gimp_paint_core_paint (GimpPaintCore *core,
115
GimpDrawable *drawable,
116
GimpPaintOptions *paint_options,
117
GimpPaintState state,
120
gboolean gimp_paint_core_start (GimpPaintCore *core,
121
GimpDrawable *drawable,
122
GimpPaintOptions *paint_options,
125
void gimp_paint_core_finish (GimpPaintCore *core,
126
GimpDrawable *drawable);
127
void gimp_paint_core_cancel (GimpPaintCore *core,
128
GimpDrawable *drawable);
129
void gimp_paint_core_cleanup (GimpPaintCore *core);
131
void gimp_paint_core_interpolate (GimpPaintCore *core,
132
GimpDrawable *drawable,
133
GimpPaintOptions *paint_options,
130
137
/* protected functions */
132
TempBuf * gimp_paint_core_get_paint_area (GimpPaintCore *core,
133
GimpDrawable *drawable,
134
GimpPaintOptions *options);
135
TempBuf * gimp_paint_core_get_orig_image (GimpPaintCore *core,
136
GimpDrawable *drawable,
142
void gimp_paint_core_paste (GimpPaintCore *core,
143
PixelRegion *paint_maskPR,
144
GimpDrawable *drawable,
145
gdouble paint_opacity,
146
gdouble image_opacity,
147
GimpLayerModeEffects paint_mode,
148
GimpPaintApplicationMode mode);
149
void gimp_paint_core_replace (GimpPaintCore *core,
150
PixelRegion *paint_maskPR,
151
GimpDrawable *drawable,
152
gdouble paint_opacity,
153
gdouble image_opacity,
154
GimpPaintApplicationMode mode);
156
void gimp_paint_core_validate_undo_tiles (GimpPaintCore *core,
157
GimpDrawable *drawable,
162
void gimp_paint_core_validate_canvas_tiles (GimpPaintCore *core,
139
TempBuf * gimp_paint_core_get_paint_area (GimpPaintCore *core,
140
GimpDrawable *drawable,
141
GimpPaintOptions *options);
142
TempBuf * gimp_paint_core_get_orig_image (GimpPaintCore *core,
143
GimpDrawable *drawable,
148
TempBuf * gimp_paint_core_get_orig_proj (GimpPaintCore *core,
149
GimpPickable *pickable,
155
void gimp_paint_core_paste (GimpPaintCore *core,
156
PixelRegion *paint_maskPR,
157
GimpDrawable *drawable,
158
gdouble paint_opacity,
159
gdouble image_opacity,
160
GimpLayerModeEffects paint_mode,
161
GimpPaintApplicationMode mode);
162
void gimp_paint_core_replace (GimpPaintCore *core,
163
PixelRegion *paint_maskPR,
164
GimpDrawable *drawable,
165
gdouble paint_opacity,
166
gdouble image_opacity,
167
GimpPaintApplicationMode mode);
169
void gimp_paint_core_validate_undo_tiles (GimpPaintCore *core,
170
GimpDrawable *drawable,
175
void gimp_paint_core_validate_saved_proj_tiles (GimpPaintCore *core,
176
GimpPickable *pickable,
181
void gimp_paint_core_validate_canvas_tiles (GimpPaintCore *core,
169
188
#endif /* __GIMP_PAINT_CORE_H__ */