Commit Graph

218 Commits

Author SHA1 Message Date
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
2009-01-17  Michael Natterer  <mitch@gimp.org>

	* all files with a GPL header and all COPYING files:

	Change licence to GPLv3 (and to LGPLv3 for libgimp).

	Cleaned up some copyright headers and regenerated the parsers in
	the ImageMap plugin.


svn path=/trunk/; revision=27913
2009-01-17 22:28:01 +00:00
Martin Nordholts 5d7bf3ca4b Implemented Erase, Anti Erase, Color Erase and Replace. These are not
* app/gegl/gimpoperationpointlayermode.c
(gimp_operation_point_layer_mode_process): Implemented Erase, Anti
Erase, Color Erase and Replace. These are not normal layer modes
and handle alpha in their own way. In addition to this, the
behavior of Replace doesn't map very well to GEGL which uses
infinite sized "layers".

Completely works the same:
 o Erase
 o Anti Erase
 o Color Erase

Works different but similar:
 o Replace

* app/paint-funcs/paint-funcs.[ch]: Expose
paint_funcs_color_erase_helper() so it can be used in the
GimpOperationPointLayerMode implementation. Once the migration is
complete this function can be moved entirely to the op and be
tailored to work on premultiplied data.

svn path=/trunk/; revision=27502
2008-10-31 21:02:26 +00:00
Sven Neumann b387734c3d Bug 547967 – Improve app/paint-funcs/ maintainability
2008-10-13  Sven Neumann  <sven@gimp.org>

	Bug 547967 – Improve app/paint-funcs/ maintainability

	Applied patch from Luidnel Maignan that splits the legacy code 
for
	layer modes into new files.
	
	* app/paint-funcs/Makefile.am
	* app/paint-funcs/layer-modes.[ch]
	* app/paint-funcs/paint-funcs-utils.h: new files with code taken
	from ...

	* app/paint-funcs/paint-funcs-generic.h
	* app/paint-funcs/paint-funcs.c: ... these two files.


svn path=/trunk/; revision=27268
2008-10-13 18:51:32 +00:00
Sven Neumann a5f8345609 added clear_region().
2008-09-01  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs.[ch]: added clear_region().

	* app/base/tile-manager-crop.c
	* app/core/gimpchannel.c
	* app/core/gimpimage-merge.c
	* app/core/gimpmaskundo.c
	* app/core/gimpprojection-construct.c: use it instead of calling
	color_region() with a zero color.



svn path=/trunk/; revision=26826
2008-09-01 20:44:00 +00:00
Sven Neumann 4d38e14aa9 applied patch from Luidnel Maignan (followup to bug #105568).
2008-08-13  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs.c (replace_inten_pixels): applied
	patch from Luidnel Maignan (followup to bug #105568).


svn path=/trunk/; revision=26535
2008-08-13 19:03:57 +00:00
Sven Neumann a39600752f followup change for bug #105568
svn path=/trunk/; revision=26527
2008-08-12 20:50:06 +00:00
Sven Neumann f35066ffe4 applied a slightly modified version of the patch from Luidnel Maignan as
2008-08-12  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs.c (replace_inten_pixels): applied 
a
	slightly modified version of the patch from Luidnel Maignan as
	attached to bug #105568. Fixes incorrect alpha treatment in
	plug-in selection masking.


svn path=/trunk/; revision=26524
2008-08-12 20:01:19 +00:00
Sven Neumann 9d1e4d278b minor formatting cleanup.
2008-03-19  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs.c: minor formatting cleanup.

svn path=/trunk/; revision=25122
2008-03-19 10:51:12 +00:00
Sven Neumann 942c8071e4 sprinkled with const qualifiers.
2007-12-18  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs.c: sprinkled with const qualifiers.

svn path=/trunk/; revision=24390
2007-12-18 14:51:55 +00:00
Michael Natterer 5bb9eb7f3f revert change below.
2007-10-21  Michael Natterer  <mitch@gimp.org>

	* app/dialogs/fade-dialog.c (fade_dialog_new): revert change below.

	* app/paint-funcs/paint-funcs.c (replace_inten_pixels): also honor
	the passed opacity when there is no mask. Fixes blending in
	replace mode then where is no selection.


svn path=/trunk/; revision=23893
2007-10-21 19:00:28 +00:00
Sven Neumann 30e5f7063b app/base/Makefile.am app/base/tile.[ch] moved tile row hints code to its
2007-10-09  Sven Neumann  <sven@gimp.org>

	* app/base/Makefile.am
	* app/base/tile.[ch]
	* app/base/tile-rowhints.[ch]: moved tile row hints code to its
	own file.
	
	* app/base/tile-cache.c
	* app/base/tile-manager.c
	* app/base/tile-swap.c
	* app/paint-funcs/paint-funcs.c: changed accordingly.

svn path=/trunk/; revision=23781
2007-10-09 16:14:10 +00:00
Sven Neumann 7aa728b0e0 app/base/tile.[ch] moved code to update tile row hints to tile.[ch].
2007-10-09  Sven Neumann  <sven@gimp.org>

	* app/base/tile.[ch]
	* app/paint-funcs/paint-funcs.c: moved code to update tile row
	hints to tile.[ch].

svn path=/trunk/; revision=23777
2007-10-09 15:28:55 +00:00
Sven Neumann 9a87143a0c set all entries to zero before assigning the new colormap.
2007-10-06  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-colormap.c (gimp_image_set_colormap): set 
all
	entries to zero before assigning the new colormap.

	* app/paint-funcs/paint-funcs.[ch]: added const qualifiers.


svn path=/trunk/; revision=23748
2007-10-06 17:36:35 +00:00
Sven Neumann 1954ee81fe use the offsets module TILE_WIDTH and TILE_HEIGHT instead of doing the
2007-09-12  Sven Neumann  <sven@gimp.org>

	* app/base/tile.c (tile_data_pointer): use the offsets module
	TILE_WIDTH and TILE_HEIGHT instead of doing the module operation
	in each and every caller.

	* app/base/boundary.c
	* app/base/pixel-region.c
	* app/base/tile-manager.c
	* app/core/gimpchannel.c
	* app/core/gimpdrawable-blend.c
	* app/core/gimpdrawable.c
	* app/core/gimpimage-contiguous-region.c
	* app/core/gimplayer.c
	* app/display/gimpdisplayshell-render.c
	* app/paint-funcs/paint-funcs.c
	* app/paint/gimppaintcore.c
	* app/tools/gimpiscissorstool.c: changed accordingly.


svn path=/trunk/; revision=23515
2007-09-12 18:29:11 +00:00
Sven Neumann 3081e02db0 renamed tile_sanitize_rowhints() to tile_allocate_rowhints().
2007-05-29  Sven Neumann  <sven@gimp.org>

	* app/base/tile.[ch]: renamed tile_sanitize_rowhints() to
	tile_allocate_rowhints().
	
	* app/base/tile-manager.c
	* app/paint-funcs/paint-funcs.c: changed accordingly.

svn path=/trunk/; revision=22648
2007-05-29 09:06:15 +00:00
Sven Neumann 45f04cc7b1 instead of just copying the border pixels, convolute the full region and
2007-05-05  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs.c (convolve_region): instead of 
just
	copying the border pixels, convolute the full region and extend
	the borders.

	* app/paint/gimpconvolve.[ch]: removed broken code that used to
	deal with the image borders. Fixes bug #434279. Also reduced the
	matrix sizes to 3x3 as only the inner 3x3 values were nonzero.


svn path=/trunk/; revision=22424
2007-05-05 19:18:25 +00:00
Sven Neumann 56ccd87877 more cosmetic cleanups to convolve_region()
svn path=/trunk/; revision=22393
2007-05-03 21:46:25 +00:00
Sven Neumann c4ff3deb5d minor cleanup.
2007-05-03  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs.c (convolve_region): minor 
cleanup.


svn path=/trunk/; revision=22392
2007-05-03 21:23:25 +00:00
Sven Neumann 3075f763ad app/paint-funcs/paint-funcs.c (gaussian_blur_region)
2007-04-26  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs.c (gaussian_blur_region)
	* plug-ins/common/blur.c (blur)
	* plug-ins/common/gauss.c (do_encoded_lre) (do_full_lre): reduce
	rounding errors.

	* plug-ins/common/checkerboard.c (checkerboard_dialog): layout
	improvements.

svn path=/trunk/; revision=22345
2007-04-26 14:30:07 +00:00
Sven Neumann 681764e4e8 round pixel values instead if just casting the float to an integer. Fixes
2007-04-25  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs.c (convolve_region): round pixel values
	instead if just casting the float to an integer. Fixes bug #432978.

svn path=/trunk/; revision=22322
2007-04-25 11:46:14 +00:00
Sven Neumann 8bfd436f31 whitespace cleanup.
2007-04-25  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs.c: whitespace cleanup.

svn path=/trunk/; revision=22321
2007-04-25 11:36:39 +00:00
Sven Neumann 04b0433c84 cosmetics
svn path=/trunk/; revision=22202
2007-03-30 10:18:05 +00:00
Sven Neumann 05d6439d9d hardcode the result of log (1.0 / 255.0) and avoid a useless call to
2007-03-30  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs.c: hardcode the result of
	log (1.0 / 255.0) and avoid a useless call to sqrt().

svn path=/trunk/; revision=22201
2007-03-30 10:14:30 +00:00
Michael Natterer e6fb62d4ac Makes default Select -> Border behaviour consistent, and makes 'sticky
2007-03-05  Michael Natterer  <mitch@gimp.org>

	Makes default Select -> Border behaviour consistent, and makes
	'sticky image edges' optional by adding a checkbox in the Border
	Selection dialog. Patch by Martin Nordholts. Fixes bug #350009.

	* app/actions/select-commands.c (select_border_cmd_callback)
	(select_border_callback): Added edge-lock checkbox to dialog and
	modified calls accordingly.

	* app/paint-funcs/paint-funcs.c (border_region)
	(compute_transition): Fixed algorithm. (compute_transition is a
	helper function to the algorithm). Also clarified many parts of
	the algorithm with comments.

	* app/paint-funcs/paint-funcs.h
	* app/core/gimpchannel.[ch]
	* app/core/gimpselection.c: Added gboolean edge_lock to function
	calls/signatures.

	* app/pdb/selection_cmds.c: Regenerated. 


svn path=/trunk/; revision=22047
2007-03-05 20:21:23 +00:00
Sven Neumann 41237259c9 In all files, changed the standard copyright notice to say "GIMP - The GNU
2006-12-09  Sven Neumann  <sven@gimp.org>

        * In all files, changed the standard copyright notice to say
        "GIMP - The GNU Image Manipulation Program".
2006-12-09 21:33:38 +00:00
Simon Budig 0308d410b4 Fixing include/declaration issues in the application:
2006-11-23  Simon Budig  <simon@gimp.org>

	Fixing include/declaration issues in the application:

	* app/composite/gimp-composite-sse2.c: disable unused debugging code

	* app/paint-funcs/paint-funcs.[ch]
	* app/paint-funcs/scale-funcs.[ch]: fix include files, add some
	prototypes, make some other functions static.

	* app/core/gimpbuffer.c
	* app/core/gimpdrawable-preview.c: changed accordingly.

	* app/tools/gimpeditselectiontool.[ch]: untangle .c and .h file.

	* app/widgets/gimpfiledialog.c: add missing #include.
2006-11-24 14:08:40 +00:00
Sven Neumann 5124acf183 some more cleanup.
2006-09-28  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs.c: some more cleanup.
2006-09-28 07:57:33 +00:00
Sven Neumann 53ececa514 app/composite/gimp-composite.h app/composite/gimp-composite-generic.c
2006-09-28  Sven Neumann  <sven@gimp.org>

	* app/composite/gimp-composite.h
	* app/composite/gimp-composite-generic.c
	* app/paint-funcs/paint-funcs-generic.h
	* app/paint-funcs/paint-funcs.c: added lots of const qualifiers,
	moved variables to local scopes.

	* app/base/pixel-processor.c: formatting.
2006-09-27 23:29:05 +00:00
Sven Neumann 528a5a3691 app/paint-funcs/paint-funcs.[ch] app/core/gimpchannel.[ch]
2006-06-05  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs.[ch]
	* app/core/gimpchannel.[ch]
	* app/core/gimpselection.c:
	* app/actions/select-commands.c: further cleaned up the patch
from
	bug #88633.
2006-06-05 20:19:12 +00:00
Michael Natterer b37478550d Applied slightly modified patch from saulgoode which allows to border a
2006-06-05  Michael Natterer  <mitch@gimp.org>

	Applied slightly modified patch from saulgoode which allows to
	border a selection without feathering. Fixes bug #88633.

	* app/paint-funcs/paint-funcs.[ch] (border_region): added boolean
	"feather_border" parameter.

	* app/core/gimpchannel.[ch]: GimpChannel::border(): ditto.

	* app/core/gimpselection.c: changed accordingly.

	* app/actions/select-commands.c: added a toggle to the border
	dialog and pass it to gimp_channel_border().

	* tools/pdbgen/pdb/selection.pdb: pass TRUE here.

	* app/pdb/selection_cmds.c: regenerated.
2006-06-05 18:33:49 +00:00
Michael Natterer c99609fd8b Fix for bug #333156:
2006-05-23  Michael Natterer  <mitch@gimp.org>

	Fix for bug #333156:

	* app/paint-funcs/paint-funcs-types.h (enum CombinationMode):
	added value COMBINE_INTEN_A_INDEXED.

	* app/paint-funcs/paint-funcs.c
	(combine_inten_a_and_indexed_pixels): new function which
	implements the new CombinationMode.

	(combine_sub_region)
	(combine_regions): added the needed bits to call the new function.

	* app/core/gimpprojection-construct.c (project_indexed): added
	mask PixelRegion parameter since that's supported by paint-funcs
	now, replaced g_warning() about unimplemented combine type
	by call to combine_regions(..., COMBINE_INTEN_A_INDEXED).

	(gimp_projection_construct_layers): pass the mask to
	project_indexed() and removed comments about not supporting it.
2006-05-23 19:18:00 +00:00
Michael Natterer d15a6191b6 app/paint-funcs/paint-funcs-generic.h implement copy_color() and
2006-05-16  Michael Natterer  <mitch@gimp.org>

	* app/paint-funcs/paint-funcs-generic.h
	* app/paint-funcs/paint-funcs.[ch]: implement copy_color() and
	copy_color_pixels() which copy only the color bytes into a dest
	that has one byte less than src. Renamed component_pixels() to
	copy_component_pixels().

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpbrushclipboard.[ch]: new GimpBrush subclass that
	auto-updates its contents from gimp->global_buffer.

	* app/core/gimp.c (gimp_real_initialize): add a clipboard brush to
	the brush factory. Fixes bug #111082.
2006-05-16 13:11:47 +00:00
Sven Neumann b254ab726e app/paint-funcs/paint-funcs-generic.h code cleanup, moved variables into
2006-04-25  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs-generic.h
	* app/paint-funcs/paint-funcs.c: code cleanup, moved variables into
	local scopes, added const qualifiers.
2006-04-25 12:19:24 +00:00
Sven Neumann f6eebeed6f app/core/gimpchannel.c (gimp_channel_real_border) added some empty lines
2006-04-25  Sven Neumann  <sven@gimp.org>

	* app/core/gimpchannel.c (gimp_channel_real_border)
	* app/paint-funcs/paint-funcs.c (border_region): added some empty
	lines to improve readability.
2006-04-25 11:05:17 +00:00
Sven Neumann 60e3301802 M ChangeLog M app/paint/gimpconvolve.c M app/paint-funcs/paint-funcs.c M
M ChangeLog
M app/paint/gimpconvolve.c
M app/paint-funcs/paint-funcs.c
M app/paint-funcs/paint-funcs.h
M app/tools/gimpiscissorstool.c
M libgimpbase/gimputils.c
M modules/colorsel_cmyk.c
M regexrepl/regex.c
2006-04-20 07:15:15 +00:00
Sven Neumann 37da566934 app/core/gimpcontext.c app/core/gimpimage.c app/paint-funcs/paint-funcs.c
2006-04-06  Sven Neumann  <sven@gimp.org>

	* app/core/gimpcontext.c
	* app/core/gimpimage.c
	* app/paint-funcs/paint-funcs.c
	* app/widgets/gimpcontrollerkeyboard.c
	* app/widgets/gimpcontrollerwheel.c
	* app/widgets/gimpcursor.c
	* app/widgets/gimpdockable.c
	* app/widgets/gimpdockbook.c
	* app/widgets/gimpdockseparator.c
	* libgimp/gimpbrushselect.c
	* libgimp/gimpfontselect.c
	* libgimp/gimpgradientselect.c
	* libgimp/gimppaletteselect.c
	* libgimp/gimppatternselect.c
	* libgimpwidgets/gimpchainbutton.c
	* libgimpwidgets/gimpcolorscales.c
	* libgimpwidgets/gimpcolorselect.c
	* libgimpwidgets/gimppickbutton.c
	* libgimpwidgets/gimpstock.c: sprinkled some const qualifiers.
2006-04-06 12:43:58 +00:00
Michael Natterer 0e835efb4e app/paint-funcs/paint-funcs-generic.h reverted patch which makes alpha=255
2005-11-09  Michael Natterer  <mitch@gimp.org>

	* app/paint-funcs/paint-funcs-generic.h
	* app/paint-funcs/paint-funcs.c: reverted patch which makes
	alpha=255 when turned off because these functions are not only
	used for display projection. Re-opens bug #143315.
	Fixes bug #307213.
2005-11-09 09:55:45 +00:00
Sven Neumann e4a1309848 fixed bug in buffer initialization, spotted by Tobias Lenz.
2005-09-20  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs.c (erode_region, dilate_region):
	fixed bug in buffer initialization, spotted by Tobias Lenz.
2005-09-20 19:38:31 +00:00
Sven Neumann 465aa7a7c5 fixed initialization of row array.
2005-08-17  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs.c (smooth_region): fixed
	initialization of row array.

	* app/base/siox.c: minor cleanups.
2005-08-17 15:38:43 +00:00
Michael Natterer fa74cbcd15 pass src_bytes and dest_bytes to these functions instead of just the
2005-08-09  Michael Natterer  <mitch@gimp.org>

	* app/paint-funcs/paint-funcs.[ch] (extract_from_inten_pixels)
	(extract_from_indexed_pixels): pass src_bytes and dest_bytes to
	these functions instead of just the source's bytes and whether it
	has an alpha. Honor dest_bytes when extracting instead of crashing
	by always asuming that the destination has alpha.
	Fixes bug #312392.

	(extract_from_region): removed has_alpha paramater. pass
	src->bytes and dest->bytes to above functions.

	* app/core/gimpselection.c (gimp_selection_extract): changed
	accordingly.
2005-08-09 21:57:08 +00:00
Sven Neumann 90d861bec2 app/paint-funcs/paint-funcs-generic.h fixed signedness warnings.
2005-08-06  Sven Neumann  <sven@gimp.org>

	* app/core/gimppalette-import.c:
	* app/paint-funcs/paint-funcs-generic.h
	* app/paint-funcs/paint-funcs.c: fixed signedness warnings.
2005-08-06 11:08:43 +00:00
Sven Neumann 395c6dbf70 fixed implementations.
2005-07-15  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs.c (erode_region) (dilate_region):
	fixed implementations.
2005-07-15 19:07:38 +00:00
Sven Neumann 2566531777 added erode_region() and dilate_region() 2005-07-14 15:40:19 +00:00
Sven Neumann 65e26d5b30 fixed implementation of smooth_region() 2005-07-13 19:13:18 +00:00
Sven Neumann fbd53c511b added smooth_region(), a simple convolution filter to smooth a mask.
2005-07-13  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs.[ch]: added smooth_region(), a
	simple convolution filter to smooth a mask.

	* app/base/segmentator.c (smooth_mask): use the new function.
2005-07-13 17:27:37 +00:00
Sven Neumann afaa010bb6 pass GimpImageBaseType to extract_from_region() instead of some anonymous
2005-06-17  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs.[ch]: pass GimpImageBaseType to
	extract_from_region() instead of some anonymous integer. Added
	some const qualifiers.
2005-06-17 16:26:06 +00:00
Shlomi Fish 886aff77aa app/paint-funcs/paint-funcs.c fix bug #143315. When the visibility of the
* app/paint-funcs/paint-funcs.c
* app/paint-funcs/paint-funcs-generic.h: fix bug #143315. When the
visibility of the Alpha channel is turned off, it should make alpha=255.
2005-03-14 18:55:24 +00:00
Sven Neumann ca9ba32c45 formatting.
2005-02-15  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs.[ch]: formatting.
2005-02-15 15:48:46 +00:00
Sven Neumann adff5aeb09 code cleanup. Removed unsued code, renamed variables and types.
2005-02-11  Sven Neumann  <sven@gimp.org>

	* app/base/pixel-processor.[ch]: code cleanup. Removed unsued code,
	renamed variables and types.

	* app/base/gimphistogram.c
	* app/core/gimpchannel-combine.c
	* app/core/gimpchannel.c
	* app/core/gimpdrawable-equalize.c
	* app/core/gimpdrawable-invert.c
	* app/core/gimpdrawable-levels.c
	* app/paint-funcs/paint-funcs.c
	* tools/pdbgen/pdb/color.pdb: changed accordingly.

	* app/pdb/color_cmds.c: regenerated.
2005-02-11 17:03:56 +00:00
Sven Neumann f3166ba9f9 app/base/base-enums.[ch] app/core/gimpdrawable-transform.c
2005-01-11  Sven Neumann  <neumann@jpk.com>

	* app/base/base-enums.[ch]
	* app/core/gimpdrawable-transform.c
	* app/core/gimpdrawable.c
	* app/paint-funcs/Makefile.am
	* app/paint-funcs/paint-funcs.[ch]
	* app/paint-funcs/scale-funcs.[ch]: applied patch by Geert Jordaens
	(after a good deal of reformatting for coding style compliance).
	This factors the scale routines into their own file and adds a
	sinc-based (Lanczos) interpolation routine (bug #162250).
2005-01-11 18:31:07 +00:00