1. 13 Jul, 2004 2 commits
    • Michael Natterer's avatar
      app/core/Makefile.am app/core/core-types.h new interface which has · 54cc251b
      Michael Natterer authored
      2004-07-14  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/Makefile.am
      	* app/core/core-types.h
      	* app/core/gimppickable.[ch]: new interface which has
      	get_image_type(), get_tiles() and get_color_at() methods.
      
      	* app/core/gimpdrawable.[ch]
      	* app/core/gimpimagemap.[ch]
      	* app/core/gimpprojection.[ch]: implement GimpPickableInterface
      	and removed public get_colot_at() functions.
      
      	* app/core/gimpimage-pick-color.[ch]: removed typedef
      	GimpImagePickColorFunc and gimp_image_pick_color_by_func(). Use
      	gimp_pickable_pick_color() instead.
      
      	* app/core/gimpimage-contiguous-region.c
      	* app/core/gimpimage-crop.c
      	* app/gui/info-window.c
      	* app/paint/gimpconvolve.c
      	* app/paint/gimpsmudge.c
      	* app/tools/gimpbycolorselecttool.c
      	* app/tools/gimpimagemaptool.c
      	* app/widgets/gimpselectioneditor.c: use GimpPickable functions
      	instead of the various get_color_at() functions. Simplifies code
      	which has a "sample_merged" boolean. Various cleanups.
      54cc251b
    • Michael Natterer's avatar
      *** empty log message *** · c5ec0d4f
      Michael Natterer authored
      c5ec0d4f
  2. 18 Jan, 2004 1 commit
    • Michael Natterer's avatar
      also return the color's alpha byte if it has alpha, not only the converted · 9efe077c
      Michael Natterer authored
      2004-01-18  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/gimpimage.[ch] (gimp_image_get_color): also return the
      	color's alpha byte if it has alpha, not only the converted RGB
      	values.  Return OPAQUE_OPACITY for drawables without alpha.
      	Fixes bug #131706.
      
      	* app/core/gimpdrawable.c (gimp_drawable_get_color_at)
      	* app/core/gimpimage-contiguous-region.c
      	(gimp_image_contiguous_region_by_color)
      	* app/core/gimpimage-projection.c (gimp_image_projection_get_color_at)
      	* app/core/gimpimagemap.c (gimp_image_map_get_color_at)
      	* app/paint/gimpclone.c (gimp_clone_line_image): removed separate
      	handling of the alpha byte from all users of gimp_image_get_color().
      9efe077c
  3. 07 Jan, 2004 1 commit
  4. 04 Jan, 2004 1 commit
    • Michael Natterer's avatar
      pass around GimpImage and GimpImageType parameters. For indexed images, · 61a1d21c
      Michael Natterer authored
      2004-01-04  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/gimpimage-contiguous-region.c
      	(gimp_image_contiguous_region_by_seed)
      	(find_contiguous_region_helper)
      	(find_contiguous_segment): pass around GimpImage and GimpImageType
      	parameters. For indexed images, convert the tile data to RGB using
      	gimp_image_get_color(). Still use the raw tile data for RGB and
      	GRAY images so the slowdown for these image types should be
      	minimal. Fixes bug #128991.
      61a1d21c
  5. 17 Dec, 2003 1 commit
  6. 05 Sep, 2003 1 commit
    • Michael Natterer's avatar
      removed function map_to_color() since it does not belong here and the two · aaf84a73
      Michael Natterer authored
      2003-09-05  Michael Natterer  <mitch@gimp.org>
      
      	* app/paint-funcs/paint-funcs.[ch]: removed function map_to_color()
      	since it does not belong here and the two places using it look much
      	cleaner when doing that stuff themselves.
      
      	* app/core/gimpdrawable-preview.c: cleanup.
      	(gimp_drawable_preview_scale): do the indexed palette lookup here
      	instead of calling map_to_color().
      
      	* app/core/gimpimage.c (gimp_image_get_color): transform the
      	colors here instead of calling map_to_color().
      
      	* app/core/gimpimage.[ch] (gimp_image_get_color): reordered
      	parameters src parameters are before dest parameters.
      	Made the src color const.
      
      	(gimp_image_transform_color): reordered so src parameters are
      	*after* dest parameters (since this function operates on the dest
      	image and it makes sense to have the dest parameters
      	together). Made the src color const here, too.
      
      	* app/core/gimpdrawable-bucket-fill.c
      	* app/core/gimpdrawable.c
      	* app/core/gimpimage-contiguous-region.c
      	* app/core/gimpimage-projection.c
      	* app/core/gimpimagemap.c
      	* app/core/gimplayer.c
      	* app/core/gimppalette-import.c
      	* app/paint/gimpclone.c
      	* app/paint/gimppaintcore.c: changed accordingly.
      
      	* app/core/gimpedit.c (gimp_edit_cut,copy): simplified by
      	moving the "cropped" variable to a local scope.
      
      	* app/core/gimpimage-mask.c: calling gimp_image_update() followed
      	by gimp_viewable_imvalidate_preview(drawable) is equal to calling
      	gimp_drawable_update() directly.
      aaf84a73
  7. 08 May, 2003 1 commit
    • Michael Natterer's avatar
      removed gimp_drawable_width,height(). · 54878b79
      Michael Natterer authored
      2003-05-08  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/gimpdrawable.[ch]: removed gimp_drawable_width,height().
      
      	* app/core/gimpitem.[ch]: added gimp_item_width,height().
      
      	* app/core/gimpchannel.c
      	* app/core/gimpdrawable-bucket-fill.c
      	* app/core/gimpdrawable-offset.c
      	* app/core/gimpdrawable-preview.c
      	* app/core/gimpdrawable-transform.c
      	* app/core/gimpimage-contiguous-region.c
      	* app/core/gimpimage-crop.c
      	* app/core/gimpimage-mask.c
      	* app/core/gimpimage-merge.c
      	* app/core/gimpimage-preview.c
      	* app/core/gimpimage-projection.c
      	* app/core/gimpimage-undo-push.c
      	* app/core/gimpimage.c
      	* app/core/gimpimagemap.c
      	* app/core/gimplayer-floating-sel.c
      	* app/core/gimplayer.c
      	* app/core/gimplayermask.c
      	* app/core/gimpscanconvert.c
      	* app/display/gimpdisplay.c
      	* app/display/gimpdisplayshell-dnd.c
      	* app/display/gimpdisplayshell.c
      	* app/gui/channels-commands.c
      	* app/gui/layers-commands.c
      	* app/paint/gimpclone.c
      	* app/paint/gimpconvolve.c
      	* app/paint/gimpdodgeburn.c
      	* app/paint/gimppaintcore.c
      	* app/paint/gimpsmudge.c
      	* app/text/gimptextlayer.c
      	* app/tools/gimpbezierselecttool.c
      	* app/tools/gimpbucketfilltool.c
      	* app/tools/gimpbycolorselecttool.c
      	* app/tools/gimpclonetool.c
      	* app/tools/gimpcroptool.c
      	* app/tools/gimpeditselectiontool.c
      	* app/tools/gimpfliptool.c
      	* app/tools/gimpfuzzyselecttool.c
      	* app/tools/gimphistogramtool.c
      	* app/tools/gimpinktool.c
      	* app/tools/gimprectselecttool.c
      	* app/tools/gimptransformtool.c
      	* app/widgets/gimpselectioneditor.c
      	* app/widgets/gimptoolbox.c
      	* tools/pdbgen/pdb/drawable.pdb
      	* tools/pdbgen/pdb/selection.pdb: changed accordingly.
      
      	* app/pdb/drawable_cmds.c
      	* app/pdb/selection_cmds.c: regenerated.
      54878b79
  8. 17 Apr, 2003 1 commit
    • Sven Neumann's avatar
      applied patch from Pedro Gimeno that fixes bug #51883. · 2e2f9fcf
      Sven Neumann authored
      2003-04-17  Sven Neumann  <sven@gimp.org>
      
      	* app/core/gimpimage-contiguous-region.c
      	(find_contiguous_region_helper): applied patch from Pedro Gimeno
      	that fixes bug #51883.
      
      	* plug-ins/common/bumpmap.c (bumpmap): applied patch from Pedro
      	Gimeno that fixes bug #52543.
      2e2f9fcf
  9. 05 Sep, 2002 1 commit
    • Michael Natterer's avatar
      put the call to gimp_drawable_mask_bounds() back because we always need · 54c377d7
      Michael Natterer authored
      2002-09-05  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/gimpdrawable-bucket-fill.c: put the call to
      	gimp_drawable_mask_bounds() back because we always need the region
      	to apply the fill (fixes non-seed-fill fills). Also take
      	"sample_merged" into account when intersecting the resulting mask
      	with the image's selection.
      
      	Fixed unrelated bug:
      
      	* app/core/gimpimage-contiguous-region.c: need to use
      	gimp_image_projection_bytes(), not drawable->bytes if
      	"sample_marged" is TRUE.
      54c377d7
  10. 03 Mar, 2002 1 commit
    • Sven Neumann's avatar
      some cleanup, removed unused parameters and code. · ddc01ea9
      Sven Neumann authored
      2002-03-03  Sven Neumann  <sven@gimp.org>
      
      	* app/core/gimpimage-contiguous-region.c: some cleanup, removed
      	unused parameters and code.
      
      	* app/widgets/gimptoolinfopreview.c: fixed stupid bug I introduced
      	yesterday.
      ddc01ea9
  11. 10 Feb, 2002 1 commit
    • Michael Natterer's avatar
      removed #if 0'ed old display update hackery. Don't flush the displays here · ceed8eae
      Michael Natterer authored
      2002-02-10  Michael Natterer  <mitch@gimp.org>
      
      	* app/undo.c: removed #if 0'ed old display update hackery. Don't
      	flush the displays here at all and include nothing from
      	"display/".
      
      	* app/undo_history.c
      	* app/gui/edit-commands.c: call gdisplays_flush() if undo_pop() or
      	undo_redo() return TRUE.
      
      	* app/core/gimpimage-contiguous-region.[ch]: allow a contiguous
      	transparent region to be selected/filled (#71058).
      
      	* app/core/gimpdrawable-bucket-fill.[ch]
      	* app/core/gimpimage-mask-select.[ch]: take a boolean
      	fill_transparent/select_transparent parameter and pass it to the
      	contiguous region funcion.
      
      	* app/display/gimpdisplayshell-dnd.c: pass
      	fill_transparent == FALSE to bucket_fill_full because we fill the
      	whole drawable anyway here.
      
      	* app/tools/gimpbucketfilltool.c
      	* app/tools/gimpbycolorselecttool.c
      	* app/tools/gimpfuzzyselecttool.c
      	* app/tools/selection_options.[ch]: added toggle buttons to the
      	tool options and pass the value to the fill and select core
      	functions.
      
      	* tools/pdbgen/pdb/misc_tools.pdb
      	* tools/pdbgen/pdb/selection_tools.pdb: hardcode
      	"select_transparent" to FALSE to get the old behaviour. Should
      	export the new feature to plug-ins however.
      
      	* app/pdb/misc_tools_cmds.c
      	* app/pdb/selection_tools_cmds.c: regenerated.
      ceed8eae
  12. 14 Dec, 2001 1 commit
    • Michael Natterer's avatar
      added GIMP_IMAGE_TYPE_IS_[RGB|GRAY|INDEXED]() and · 37269769
      Michael Natterer authored
      2001-12-14  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/gimpimage.[ch]: added
      	GIMP_IMAGE_TYPE_IS_[RGB|GRAY|INDEXED]() and
      	GIMP_IMAGE_TYPE_BASE_TYPE() macros.
      
      	* app/plug-in/plug-in.[ch]: new enum PlugInImageType instead of
      	multiple #defines.
      
      	* app/gui/file-dialog-utils.[ch]: file_dialog_update_menus(): take
      	a GimpImageType instead of the PlugInImageType.
      
      	* app/core/gimpdrawable-preview.c
      	* app/core/gimpdrawable-transform.c
      	* app/core/gimpdrawable.c
      	* app/core/gimpimage-contiguous-region.c
      	* app/core/gimpimage-mask.c
      	* app/core/gimpimage-merge.c
      	* app/core/gimplayermask.c
      	* app/core/gimppalette-import.c
      	* app/display/gimpdisplay-handlers.c
      	* app/display/gimpdisplayshell-render.c
      	* app/gui/file-save-dialog.c
      	* app/gui/toolbox.c
      	* app/tools/gimpclonetool.c
      	* app/tools/gimpcolorpickertool.c
      	* tools/pdbgen/pdb/convert.pdb
      	* tools/pdbgen/pdb/image.pdb: use the new macros, cleanups like
      	storing GimpImageType in GimpImageType variables, not just gint.
      
      	* app/pdb/convert_cmds.c
      	* app/pdb/image_cmds.c: regenerated.
      
      	* app/widgets/gimpdialogfactory.c: save the state of the "Auto"
      	button in sessionrc.
      37269769
  13. 11 Dec, 2001 1 commit
    • Sven Neumann's avatar
      app/base/base-enums.h moved all remaining enums to base-enums.h · 03a6c044
      Sven Neumann authored
      2001-12-11  Sven Neumann  <sven@gimp.org>
      
      	* app/base/base-enums.h
      	* app/base/base-types.h: moved all remaining enums to base-enums.h
      
      	* app/core/core-enums.h
      	* app/core/core-types.h: moved GimpImageType to core-enums.h and
      	changed the values from RGB_GIMAGE to GIMP_RGB_IMAGE and the like.
      
      	* app/core/gimpchannel.c
      	* app/core/gimpdrawable-preview.c
      	* app/core/gimpdrawable-transform.c
      	* app/core/gimpdrawable.c
      	* app/core/gimpimage-contiguous-region.c
      	* app/core/gimpimage-convert.c
      	* app/core/gimpimage-mask.c
      	* app/core/gimpimage-merge.c
      	* app/core/gimpimage-new.c
      	* app/core/gimpimage-projection.c
      	* app/core/gimpimage.[ch]
      	* app/core/gimplayer.c
      	* app/core/gimplayermask.c
      	* app/core/gimppalette-import.c
      	* app/display/gimpdisplayshell-dnd.c
      	* app/display/gimpdisplayshell-render.c
      	* app/gui/file-save-dialog.c
      	* app/gui/toolbox.c
      	* app/plug-in/plug-in.c
      	* app/tools/gimpblendtool.c
      	* app/tools/gimpcolorpickertool.c
      	* app/tools/gimpdodgeburntool.c: changed accordingly.
      
      	* tools/pdbgen/Makefile.am: no need to parse app/base/base-types.h
      	any longer.
      
      	* app/pdb/color_cmds.c
      	* app/pdb/drawable_cmds.c
      	* app/pdb/layer_cmds.c
      	* app/pdb/paint_tools_cmds.c
      	* tools/pdbgen/enums.pl: regenerated.
      03a6c044
  14. 28 Nov, 2001 1 commit
    • Michael Natterer's avatar
      app/core/Makefile.am new files. Changed function names to be consistent. · 9bac8faf
      Michael Natterer authored
      2001-11-28  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/Makefile.am
      	* app/core/gimpimage-projection.[ch]: new files. Changed function
      	names to be consistent.
      
      	* app/core/gimpimage.[ch]: removed the projection stuff
      	here. Removed the gimp_image_composite_blah() functions becauee
      	they were just calling the resp. gimp_image_projection ones.
      
      	* app/core/gimpimage-contiguous-region.c
      	* app/core/gimpimage-convert.c
      	* app/core/gimpimage-crop.c
      	* app/core/gimppalette-import.c
      	* app/undo.c
      	* app/display/gimpdisplay.c
      	* app/display/gimpdisplayshell-render.c
      	* app/gui/info-window.c
      	* app/tools/gimpbycolorselecttool.c
      	* app/tools/gimpcolorpickertool.c
      	* app/tools/gimpiscissorstool.c: changed accordingly.
      9bac8faf
  15. 29 Oct, 2001 1 commit
    • Sven Neumann's avatar
      rewrote so gcc-3.0 doesn't complain. · de5af18f
      Sven Neumann authored
      2001-10-29  Sven Neumann  <sven@gimp.org>
      
      	* app/base/temp-buf.c (temp_buf_to_gray): rewrote so gcc-3.0 doesn't
      	complain.
      
      	* app/widgets/gimpfontselection-dialog.c: use g_ascii_strcasecmp().
      
      	* libgimp/gimpintl.h
      	* libgimp/stdplugins-intl.h
      	* plug-ins/script-fu/script-fu-intl.h: don't call gtk_set_locale()
      	since gtk_init() does it for us now. Don't set LC_NUMERIC to "C".
      	INIT_I18N_UI() is the same as INIT_I18N_UI() now.
      
      	* app/devices.c
      	* app/gimprc.c
      	* app/core/gimpbrushgenerated.c
      	* app/core/gimpgradient.c
      	* app/gui/color-notebook.c
      	* app/gui/gradients-commands.c
      	* plug-ins/gfig/gfig.c
      	* plug-ins/gflare/gflare.c
      	* plug-ins/gimpressionist/presets.c
      	* plug-ins/ifscompose/ifscompose_storage.c: use g_ascii_formatd() and
      	g_ascii_strtod() to serialize and deserialize floats. These functions
      	are locale-independent. There are probably more places that need to be
      	fixed in this fashion.
      
      	* plug-ins/script-fu/script-fu-console.c
      	* plug-ins/script-fu/script-fu-scripts.c
      	* plug-ins/script-fu/script-fu-server.c
      	* plug-ins/script-fu/script-fu.c: s/INIT_I18N_UI/INIT_I18N/
      
      	* tools/gimp-remote.c
      	* app/widgets/gimpwidgets-utils.c
      	* app/core/gimpimage-contiguous-region.c
      	* app/paint-funcs/paint-funcs-indexeda.c
      	* app/paint-funcs/paint-funcs.c
      	* app/tools/gimppathtool.c
      	* app/tools/path_tool.c
      	* modules/colorsel_triangle.c
      	* plug-ins/common/mpeg.c
      	* plug-ins/imagemap/imap_csim_parse.c: cleanups
      de5af18f
  16. 22 Oct, 2001 1 commit
    • Michael Natterer's avatar
      General cleanup of the selection tools and their PDB wrappers: · 99e78c70
      Michael Natterer authored
      2001-10-22  Michael Natterer  <mitch@gimp.org>
      
      	General cleanup of the selection tools and their PDB wrappers:
      
      	* app/core/Makefile.am
      	* app/core/gimpimage-contiguous-region.[ch]
      	* app/core/gimpimage-mask-select.[ch]: new files providing a clean,
      	uniform API for the selection functionalities. Changed order of
      	parameters to be consistent, removed code duplication.
      
      	The region returned by the "by_color" function is not really
      	contiguous but the API is so similar to "by_seed" and it's used
      	in the same context so it's fair enough to put them together.
      
      	Also, I'm not sure if the two is_pixel_sufficiently_different()
      	I've optimized away were meant to do *exactly* the same. Added
      	a comment there to remember the former difference.
      
      	* app/core/gimpchannel.[ch] (gimp_channel_feather): removed the
      	"output" channel parameter and made it optionally push an undo
      	(like the other channel operations do).
      
      	* app/core/gimpimage-mask.c: call gimp_channel_feather() with
      	"push_undo == TRUE", removed some useless comments.
      
      	* app/tools/gimpbycolorselecttool.[ch]
      	* app/tools/gimpellipseselecttool.[ch]
      	* app/tools/gimpfreeselecttool.[ch]
      	* app/tools/gimpfuzzyselecttool.[ch]
      	* app/tools/gimprectselecttool.[ch]: removed all the actual
      	selection functionality and call the new gimp_image_mask_select_*()
      	and gimp_image_contiguous_region_*() functions instead.
      
      	* app/tools/gimpbezierselecttool.c
      	* app/tools/gimpiscissorstool.c: use new function
      	gimp_image_mask_select_channel() instead of doing the same manually.
      
      	* app/tools/gimpbucketfilltool.c: find_contiguous_region() ->
      	gimp_image_contiguous_region_by_seed().
      
      	* tools/pdbgen/Makefile.am
      	* tools/pdbgen/groups.pl
      	* tools/pdbgen/pdb/selection_tools.pdb: added new group "Selection
      	Tools" which depends only on "core/" stuff (not on "tools/" any
      	more, brrrr).
      
      	* tools/pdbgen/pdb/text_tool.pdb: don't include "appenv.h"
      
      	* tools/pdbgen/pdb/tools.pdb: removed the selection tools.
      
      	* app/pdb/Makefile.am
      	* app/pdb/selection_tools_cmds.c: new file.
      
      	* app/pdb/internal_procs.c
      	* app/pdb/text_tool_cmds.c
      	* app/pdb/tools_cmds.c: regenerated.
      
      	* libgimp/Makefile.am
      	* libgimp/gimp_pdb.h
      	* libgimp/gimpselectiontools_pdb.[ch]: new files.
      
      	* libgimp/gimptools_pdb.[ch]: regenerated
      
      	Misc cleanups:
      
      	* app/app_procs.c: call splash_create() with "no_splash_image"
      	as parameter.
      
      	* app/display/gimpdisplay-render.c
      	* app/display/gximage.c: don't include "appenv.h".
      
      	* app/gui/gui.c: call session_restore() only if "restore_session"
      	is TRUE.
      
      	* app/gui/session.c: don't "if(restore_session)" here and don't
      	include "appenv.h"
      
      	* app/gui/splash.[ch]: added "gboolean show_image" parameter to
      	splash_create(), don't include "appenv.h"
      
      	* app/tools/gimppainttool.[ch]: added a "GimpGradient" parameter
      	to gimp_paint_tool_get_color_from_gradient().
      
      	* app/tools/gimppaintbrushtool.c: pass the gradient.
      
      	* app/tools/gimpselectiontool.c
      	* app/tools/gimptransformtool.c
      	* app/tools/tool_manager.c: s/GDisplay/GimpDisplay/.
      
      	* app/widgets/gimpcontainergridview.[ch]: removed the "white_style"
      	class variable and don't fiddle around with colors and styles...
      
      	* themes/Default/gtkrc: ...do the same here with a simple rc style.
      99e78c70