Commit Graph

244 Commits

Author SHA1 Message Date
William Skaggs d342691580 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/paint-funcs/scale-funcs.c (scale_region_lanczos):
	fix variable declarations accidentally changed from gdouble
	to gint in revision 1.7; fixes bug #343804.
2006-06-05 22:45:09 +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 0937112af2 code cleanup, moved variables into local scopes, added const qualifiers.
2006-04-26  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-funcs.c: code cleanup, moved variables into
	local scopes, added const qualifiers.
2006-04-26 09:22:34 +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 049872b361 app/*.[ch] converted tabs to spaces.
2006-04-12  Sven Neumann  <sven@gimp.org>

	* app/*.[ch]
	* app/*/*.[ch]: converted tabs to spaces.
2006-04-12 12:49:29 +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
Sven Neumann 20a48412bc fixed compiler warning and sprinkled some empty lines for readability.
2006-03-31  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-funcs.c: fixed compiler warning and
	sprinkled some empty lines for readability.
2006-03-31 10:17:23 +00:00
Raphael Quinet 7d8998a99c automatically removed trailing whitespace from 3460 lines.
2006-01-17  Raphael Quinet  <raphael@gimp.org>

	* (about 130 *.[ch] files): automatically removed trailing
	whitespace from 3460 lines.
2006-01-17 12:43:50 +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
Manish Singh 58a93cc101 declare component_pixels, combine_mask_and_alpha_channel_{stipple,stroke}.
2005-10-27  Manish Singh  <yosh@gimp.org>

        * app/paint-funcs/paint-funcs.h: declare component_pixels,
        combine_mask_and_alpha_channel_{stipple,stroke}. Fixes bug #319811.
2005-10-27 19:13:57 +00:00
David Odin 0fe6fad47f correctly pass the region offset to pixel_region_get_row().
* app/paint-funcs/scale-funcs.c (subsample_region): correctly pass
  the region offset to pixel_region_get_row().
2005-10-25 18:16:42 +00:00
Sven Neumann 8c9e9140c0 replaced the binary XOR operations with a naive but faster implementation
2005-09-28  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs-generic.h (swap_pixels): replaced
	the binary XOR operations with a naive but faster implementation
	using a local variable.
2005-09-27 22:27:26 +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
William Skaggs f06d1a66e4 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/paint-funcs/paint-funcs-generic.h (blend_pixels): change
	variables from unsigned to signed -- fixes problem described
	in comment 17 of bug #163721.
2005-09-06 17:58:55 +00:00
William Skaggs 4ba616a300 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/paint-funcs/paint-funcs-generic.h (blend_pixels):
	Change blending algorithm to fix misbehavior of smudge
	tool, should fix bug #163721.
2005-08-24 17:55:52 +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 4b29677d16 gaussian_blur_region() writes to the pixel data, need to initialize the
2005-07-09  Sven Neumann  <sven@gimp.org>

	* app/core/gimpchannel.c (gimp_channel_real_feather):
	gaussian_blur_region() writes to the pixel data, need to initialize
	the pixel region with dirty == TRUE;

	* app/paint-funcs/paint-funcs-generic.h: formatting.
2005-07-09 11:48:02 +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
Daniel Egger 0add60298a app/base/Makefile.am app/composite/*akefile.am app/config/*akefile.am
2005-02-27  Daniel Egger  <de@axiros.com>

	* app/base/Makefile.am
	* app/composite/*akefile.am
	* app/config/*akefile.am
	* app/core/*akefile.am
	* app/display/*akefile.am
	* app/file/*akefile.am
	* app/paint-funcs/*akefile.am
	* app/pdb/*akefile.am
	* app/plug-in/*akefile.am
	* app/text/*akefile.am
	* app/tools/*akefile.am
	* app/vectors/*akefile.am
	* app/xcf/*akefile.am: Commonized include paths to always look
	in the builddir also to cater for srcdir != builddir builds.
2005-02-27 13:22:01 +00:00
Hans Breuer c6f63ea4e1 TILE_WIDTH is used unconditionally so always include "tile.h" WIN32 needs
2005-02-19  Hans Breuer  <hans@breuer.org>

	* app/base/pixel-processor.c : TILE_WIDTH is used unconditionally
	so always include "tile.h"
	* app/base/tile-swap.c : WIN32 needs <process.h> for _getpid()

	* app/dialogs/user-install-dialog.c : include gimpwin32-io.h
	* libgimpbase/gimpwin32-io.h : there are no group or other
	flags in msvcrt, define S_IGRP etc in terms of _S_IREAD etc

	* plug-ins/script-fu/script-fu.c plug-ins/script-fu/siod-wrapper.c :
	no script-fu server on win32, make respective function calls conditional

	* libgimpconfig/makefile.msc : new file
	* **/makefile.msc app/gimpcore.def : updated, gimp builds
	and runs once more with ms toolchain
2005-02-19 00:50:36 +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 9511753a02 check for gthread-2.0 unless the --disable-mp option is given.
2005-02-13  Sven Neumann  <sven@gimp.org>

	* configure.in: check for gthread-2.0 unless the --disable-mp
	option is given.

	* app/app_procs.c (app_libs_init): call g_thread_init().

	* app/base/pixel-processor.c: ported to GThread.

	* app/Makefile.am
	* app/*/Makefile.am: use @GTHREAD_CFLAGS@.
2005-02-13 15:08:08 +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 ad0e39b62a applied patch from Geert Jordaens that improves results of the Lanczos
2005-01-20  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-funcs.[ch]: applied patch from Geert
	Jordaens that improves results of the Lanczos interpolation
	routine.
2005-01-20 10:31:36 +00:00
Sven Neumann f7234cc616 app/core/gimpdrawable-transform.c minor cleanups to the new Lanczos
2005-01-15  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable-transform.c
	* app/paint-funcs/scale-funcs.c: minor cleanups to the new Lanczos
	interpolation routines. Drawable transformations do still crash :(
2005-01-15 20:46:21 +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
Michael Natterer 53c3ff1821 added new function copy_region_nocow() as a workaround for the fact that
2004-12-12  Michael Natterer  <mitch@gimp.org>

	* app/paint-funcs/paint-funcs.[ch]: added new function
	copy_region_nocow() as a workaround for the fact that sharing
	tiles with the projection is heavily broken.

	* app/base/tile-manager.c (tile_invalidate): added a warning when
	entering the code path that breaks badly.

	* app/core/gimp-edit.[ch]: added gimp_edit_copy_visible(), using
	the non-COW copying function above.

	* app/widgets/gimphelp-ids.h: added GIMP_HELP_COPY_VISIBLE.

	* app/actions/edit-actions.c
	* app/actions/edit-commands.[ch]: added action & callback for
	"edit-copy-visible".

	* menus/image-menu.xml.in: added "edit-copy-visible" to the image
	menu.

	* tools/pdbgen/pdb/edit.pdb: added gimp_edit_copy_visible()
	PDB wrapper.

	* app/pdb/edit_cmds.c
	* app/pdb/internal_procs.c
	* libgimp/gimpedit_pdb.[ch]: regenerated.

	* plug-ins/script-fu/scripts/copy-visible.scm: removed all code
	and made it a backward compat wrapper around gimp-edit-copy-visible.
	Fixes bug #138662.
2004-12-12 14:01:08 +00:00
Michael Natterer e2120e2c62 applied patch from Joao S. O. Bueno which moves assignments into an "else"
2004-11-03  Michael Natterer  <mitch@gimp.org>

	* app/paint-funcs/paint-funcs.c (combine_sub_region): applied
	patch from Joao S. O. Bueno which moves assignments into an "else"
	branch and thus optimizes the (common) "if" branch. Did some
	cosmetic cleanups.
2004-11-03 00:38:04 +00:00
Sven Neumann c6cbd6d335 Applied a bunch of AIX portability fixes (bug #148813):
2004-07-30  Sven Neumann  <sven@gimp.org>

	Applied a bunch of AIX portability fixes (bug #148813):

	* configure.in: when testing for Xmu library, link with -lXt -lX11.

	* app/gui/tips-parser.c
	* app/gui/user-install-dialog.c
	* app/tools/tools-enums.h
	* app/widgets/gimpdasheditor.c
	* app/widgets/widgets-enums.h
	* libgimpthumb/gimpthumb-error.h
	* libgimpwidgets/gimpcolorbutton.c
	* plug-ins/common/edge.c: removed trailing commas from enums.

	* plug-ins/common/snoise.c

	* plug-ins/imagemap/imap_cmd_move.c: no C++ style comments.

	* app/paint-funcs/paint-funcs-generic.h
	* app/paint-funcs/paint-funcs.c: use integers for bit fields.
2004-07-30 00:57:22 +00:00
Michael Natterer ddd4e1c760 don't scan app/paint-funcs/paint-funcs-types.h for enums.
2004-07-05  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/Makefile.am (enum_headers): don't scan
	app/paint-funcs/paint-funcs-types.h for enums.

	* app/paint-funcs/paint-funcs-types.h: removed /*< pdb-skip >*/

	* app/core/core-types.h: reordered opaque typedefs to somehow
	match the categories in the comments.
2004-07-05 21:39:54 +00:00
Sven Neumann 2b78805a89 declared gimp_drawable_transform_cubic() as inline function. Makes
2004-06-14  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable-transform.c: declared
	gimp_drawable_transform_cubic() as inline function. Makes
	sample_cubic() run about 10% faster and causes a 7% speedup on
	cubic transformations.

	* app/paint-funcs/paint-funcs.c (border_region): avoid an
	unnecessary memory allocation.
2004-06-14 13:38:31 +00:00
Sven Neumann 0256a2dcd2 some code cleanup I did while attempting to optimize this code further.
2004-06-14  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs-generic.h (color_pixels): some code
	cleanup I did while attempting to optimize this code further.
2004-06-14 12:18:30 +00:00
Sven Neumann 847e41fa24 don't call tile_ewidth() three times from the inner loop.
2004-06-13  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs.c (shapeburst_region): don't call
	tile_ewidth() three times from the inner loop.

	* app/base/tile-manager.c (tile_manager_get): don't call
	tile_size() twice on the same tile.

	* app/base/tile-private.h: added tile_size_inline(), an inline
	version of the tile_size() function.

	* app/base/tile-cache.c
	* app/base/tile-manager.c
	* app/base/tile-swap.c
	* app/base/tile.c: use tile_size_inline() from inside the tile
	subsystem.
2004-06-13 13:19:19 +00:00
Sven Neumann b9211077cd added progress callback.
2004-06-13  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs.[ch] (shapeburst_region): added
	progress callback.

	* app/core/gimpdrawable-blend.c: show a progress while calculating
	the Shapeburst. Not perfect but better than not showing any
	progress at all.
2004-06-13 10:52:42 +00:00
Sven Neumann 8ce95ff6d5 app/paint/gimppaintcore.c app/paint-funcs/paint-funcs-generic.h applied a
2004-06-05  Sven Neumann  <sven@gimp.org>

	* app/paint/gimppaintcore.c
	* app/paint-funcs/paint-funcs-generic.h
	* app/paint-funcs/paint-funcs.[ch]: applied a patch from Philip
	Lafleur that changes the way that paint is applied during a paint
	stroke. Fixes bug #124225.
2004-06-05 16:21:41 +00:00
Sven Neumann e0ebd94ee9 app/paint/gimpconvolve.c app/paint-funcs/paint-funcs.[ch] reverted last
2004-05-31  Sven Neumann  <sven@gimp.org>

	* app/paint/gimpconvolve.c
	* app/paint-funcs/paint-funcs.[ch]
	* app/tools/gimpiscissorstool.c: reverted last change and applied
	new patch instead (bug #72878).
2004-05-31 10:36:06 +00:00
Sven Neumann 727ed840ab app/paint/gimpconvolve.c app/paint-funcs/paint-funcs.[ch] applied a patch
2004-05-31  Sven Neumann  <sven@gimp.org>

	* app/paint/gimpconvolve.c
	* app/paint-funcs/paint-funcs.[ch]
	* app/tools/gimpiscissorstool.c: applied a patch from Philip
	Lafleur that fixes RGBA resampling in Convolve tool (bug #72878).
2004-05-31 07:45:50 +00:00
Sven Neumann 44fd2e0add header cleanup, added some const qualifiers, converted tabs to spaces.
2004-04-15  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs.[ch]:
	* app/paint-funcs/paint-funcs-generic.h: header cleanup, added
	some const qualifiers, converted tabs to spaces. Fixes bug #140115
	for the HEAD branch.
2004-04-15 12:38:54 +00:00