mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-21 20:12:30 +00:00
added some comments.
2007-01-22 Sven Neumann <sven@gimp.org> * app/paint/gimppaintbrush.c: added some comments. * app/paint/gimppaintcore.c: sprinkled with const qualifiers. svn path=/trunk/; revision=21756
This commit is contained in:
parent
0e55a7f5f7
commit
125c3d9632
|
@ -1,3 +1,9 @@
|
|||
2007-01-22 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/paint/gimppaintbrush.c: added some comments.
|
||||
|
||||
* app/paint/gimppaintcore.c: sprinkled with const qualifiers.
|
||||
|
||||
2007-01-22 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/widgets/gimpdatafactoryview.c: don't add the open-as-image
|
||||
|
|
|
@ -127,6 +127,7 @@ _gimp_paintbrush_motion (GimpPaintCore *paint_core,
|
|||
if (! area)
|
||||
return;
|
||||
|
||||
/* optionally take the color from the current gradient */
|
||||
if (gimp_paint_options_get_gradient_color (paint_options, image,
|
||||
paint_core->cur_coords.pressure,
|
||||
paint_core->pixel_dist,
|
||||
|
@ -146,9 +147,9 @@ _gimp_paintbrush_motion (GimpPaintCore *paint_core,
|
|||
|
||||
paint_appl_mode = GIMP_PAINT_INCREMENTAL;
|
||||
}
|
||||
/* otherwise check if the brush has a pixmap and use that to color the area */
|
||||
else if (brush_core->brush && brush_core->brush->pixmap)
|
||||
{
|
||||
/* if it's a pixmap, do pixmap stuff */
|
||||
gimp_brush_core_color_area_with_pixmap (brush_core, image, drawable,
|
||||
area,
|
||||
brush_core->scale,
|
||||
|
@ -156,6 +157,7 @@ _gimp_paintbrush_motion (GimpPaintCore *paint_core,
|
|||
|
||||
paint_appl_mode = GIMP_PAINT_INCREMENTAL;
|
||||
}
|
||||
/* otherwise fill the area with the foreground color */
|
||||
else
|
||||
{
|
||||
gimp_image_get_foreground (image, context, gimp_drawable_type (drawable),
|
||||
|
@ -171,6 +173,7 @@ _gimp_paintbrush_motion (GimpPaintCore *paint_core,
|
|||
if (pressure_options->opacity)
|
||||
opacity *= PRESSURE_SCALE * paint_core->cur_coords.pressure;
|
||||
|
||||
/* finally, let the brush core paste the colored area on the canvas */
|
||||
gimp_brush_core_paste_canvas (brush_core, drawable,
|
||||
MIN (opacity, GIMP_OPACITY_OPAQUE),
|
||||
gimp_context_get_opacity (context),
|
||||
|
|
|
@ -572,17 +572,17 @@ gimp_paint_core_get_orig_image (GimpPaintCore *core,
|
|||
gint x2,
|
||||
gint y2)
|
||||
{
|
||||
PixelRegion srcPR;
|
||||
PixelRegion destPR;
|
||||
Tile *undo_tile;
|
||||
gboolean release_tile;
|
||||
gint h;
|
||||
gint pixelwidth;
|
||||
gint drawable_width;
|
||||
gint drawable_height;
|
||||
guchar *s;
|
||||
guchar *d;
|
||||
gpointer pr;
|
||||
PixelRegion srcPR;
|
||||
PixelRegion destPR;
|
||||
Tile *undo_tile;
|
||||
gboolean release_tile;
|
||||
gint h;
|
||||
gint pixelwidth;
|
||||
gint drawable_width;
|
||||
gint drawable_height;
|
||||
const guchar *s;
|
||||
guchar *d;
|
||||
gpointer pr;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_PAINT_CORE (core), NULL);
|
||||
g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), NULL);
|
||||
|
@ -629,9 +629,8 @@ gimp_paint_core_get_orig_image (GimpPaintCore *core,
|
|||
undo_tile = tile_manager_get_tile (core->undo_tiles,
|
||||
srcPR.x, srcPR.y,
|
||||
TRUE, FALSE);
|
||||
s = (guchar *) tile_data_pointer (undo_tile,
|
||||
srcPR.x % TILE_WIDTH,
|
||||
srcPR.y % TILE_HEIGHT);
|
||||
s = tile_data_pointer (undo_tile,
|
||||
srcPR.x % TILE_WIDTH, srcPR.y % TILE_HEIGHT);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -668,18 +667,18 @@ gimp_paint_core_get_orig_proj (GimpPaintCore *core,
|
|||
gint x2,
|
||||
gint y2)
|
||||
{
|
||||
TileManager *src_tiles;
|
||||
PixelRegion srcPR;
|
||||
PixelRegion destPR;
|
||||
Tile *saved_tile;
|
||||
gboolean release_tile;
|
||||
gint h;
|
||||
gint pixelwidth;
|
||||
gint pickable_width;
|
||||
gint pickable_height;
|
||||
guchar *s;
|
||||
guchar *d;
|
||||
gpointer pr;
|
||||
TileManager *src_tiles;
|
||||
PixelRegion srcPR;
|
||||
PixelRegion destPR;
|
||||
Tile *saved_tile;
|
||||
gboolean release_tile;
|
||||
gint h;
|
||||
gint pixelwidth;
|
||||
gint pickable_width;
|
||||
gint pickable_height;
|
||||
const guchar *s;
|
||||
guchar *d;
|
||||
gpointer pr;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_PAINT_CORE (core), NULL);
|
||||
g_return_val_if_fail (GIMP_IS_PICKABLE (pickable), NULL);
|
||||
|
@ -728,9 +727,8 @@ gimp_paint_core_get_orig_proj (GimpPaintCore *core,
|
|||
saved_tile = tile_manager_get_tile (core->saved_proj_tiles,
|
||||
srcPR.x, srcPR.y,
|
||||
TRUE, FALSE);
|
||||
s = (guchar *) tile_data_pointer (saved_tile,
|
||||
srcPR.x % TILE_WIDTH,
|
||||
srcPR.y % TILE_HEIGHT);
|
||||
s = tile_data_pointer (saved_tile,
|
||||
srcPR.x % TILE_WIDTH, srcPR.y % TILE_HEIGHT);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue