Commit Graph

32 Commits

Author SHA1 Message Date
Manish Singh f764c56d03 Be smarter about emitting the "invalidate_preview" signal.
comitted using Yosh's account...


--Sven
2000-06-03 18:19:22 +00:00
Sven Neumann 9529e1e696 app/Makefile.am app/paint_core.c moved brush subsampling kernels into its
2000-05-29  Sven Neumann  <sven@gimp.org>

        * app/Makefile.am
        * app/paint_core.c
        * app/paint_core_kernels.h: moved brush subsampling kernels
        into its own header file and generated a slightly different
        kernel (using the new kernelgen tool, see below). The new
        kernel simulates a circular brush instead of a rectangular
        one and gives slightly different (lighter) results.

        * app/gimage_mask.c: when stroking a selection, offset the
        points by 0.5 to align the brushes with the pixel grid. This
        lets you create 1-pixel wide rectangles and ellipses.

        * tools/Makefile.am
        * tools/kernelgen.c: simple hack to generate subsampling
        kernels.
2000-05-29 08:40:29 +00:00
jaycox 2ba5ae4c24 Fix the end of group check in gimage_mask_stroke. This fixes bug #8699
* app/gimage_mask.c: Fix the end of group check in
	gimage_mask_stroke.  This fixes bug #8699
2000-04-29 22:00:27 +00:00
Michael Natterer c73b233f8a app/color_select.c app/colormaps.[ch] removed unused global variables
2000-04-26  Michael Natterer  <mitch@gimp.org>

	* app/color_select.c
	* app/colormaps.[ch]
	* app/context_manager.c: removed unused global variables
	[foreground|background]_pixel and [old|new]_color_pixel.

	Initialize the colormap and visual stuff with GdkRGB instead of
	GtkPreview functions (which are deprecated).

	* app/[62 files]: removed #include's (started with colormaps.h and
	couldn't stop). Also ordered them consistently and did some small
	unrelated cleanups.
	Removed variuos <stdlib.h> et.al. but checked the files carefully
	before doing so. If I was too radical and you get warnings on your
	platform, please flame me or just put them back :)
2000-04-27 17:27:28 +00:00
Michael Natterer 5735b2adcd add an "add_alpha" parameter to allow selected regions to be extracted
2000-03-26  Michael Natterer  <mitch@gimp.org>

	* app/gimage_mask.[ch] (gimage_mask_extract): add an "add_alpha"
	parameter to allow selected regions to be extracted without having
	an alpha channel added.

	* app/global_edit.c: pass add_alpha = TRUE.

	* app/transform_core.[ch]: made the transform core work on
	non-layer drawables even if no selection is present. Fixes #7485
	and #7555.

	- transform_core_cut(): extract the mask without alpha if
	  operating on a non-layer without having a selection.
	- transform_core_paste(): return a boolean indicating success
	  instead of a layer and handle channels correctly.
	- transform_core_do(): if the "floating_tiles" passed to the
	  function are from an un-floated non-layer, treat the whole
	  non-layer as alpha channel and never enter the loop which
	  transforms the (not present) color channels.
	  Also clip the result to ensure that the channel never grows
	  larger then the image.

	* app/tools_cmds.c
	* tools/pdbgen/pdb/tools.pdb: transform_core_paste() returns a
	gboolean now.
2000-03-26 18:39:03 +00:00
Sven Neumann c6b6cd9d7a app/fileops.c when reverting an image, reconnect all affected views to the
* app/fileops.c
* app/gdisplay.[ch]: when reverting an image, reconnect all
  affected views to the reverted version. This fixes one of the
  bugs Tigert pointed out at GUADEC.

* app/gimage_mask.[ch]
* app/flip_tool.c: cleanups


--Sven & Mitch
2000-03-21 03:19:11 +00:00
Sven Neumann c9482821ab mostly header cleanup and i18n
--Sven
2000-01-31 23:59:05 +00:00
Michael Natterer 4923047146 removed BOUNDS, MINIMUM and MAXIMUM. No need to include both <glib.h> and
2000-01-25  Michael Natterer  <mitch@gimp.org>

	* app/appenv.h: removed BOUNDS, MINIMUM and MAXIMUM. No need to
	include both <glib.h> and <gtk/gtk.h>.

	* app/*
	* tools/pdbgen/pdb/text_tool.pdb: s/BOUNDS/CLAMP/,
	same for MIN and MAX.

	* app/preferences_dialog.c: the "Check Size" widget was connected
	to the transparency_type variable.

	* plug-ins/common/sobel.c: removed definitions of MIN and ROUND.

	* libgimp/gimp.h: #include "gimplimits.h" and "gimpcolorspace.h".

	* plug-ins/*: don't include the two files.
2000-01-25 23:06:12 +00:00
Garry R. Osgood 16d1795918 app/disp_callbacks.c app/gimage_mask.c app/global_edit.c app/interface.c
2000-01-11  Garry R. Osgood <gosgood@idt.net>
* app/disp_callbacks.c
* app/gimage_mask.c
* app/global_edit.c
* app/interface.c
* app/layer.c
* app/layer.h
* app/transform_core.c  Followup to #4708. Some clients
of layer_new_from_tiles() need to specify the
kind of layer they need; added a GimpImageType
parameter for this purpose. Closes #5045.
* app/paths_dialog.c paths_dialog_set_default_op()
now checks for the existence of the path_dialog
before manipulating its internals. Closes #5049;
2000-01-11 20:08:45 +00:00
Sven Neumann a34415cb7b Removed the obsolete drawable argument from layer_from_tiles.
The layer_type is now taken from the base_type of the image.
Also changed the name to layer_new_from_tiles.


--Sven
2000-01-01 18:33:40 +00:00
BST 1999 Andy Thomas 6e28558948 app/bezier_select.c app/edit_selection.c app/flip_tool.c app/gimage_mask.c
Mon Oct 18 21:24:47 BST 1999 Andy Thomas <alt@gimp.org>

	* app/bezier_select.c
	* app/edit_selection.c
	* app/flip_tool.c
	* app/gimage_mask.c
	* app/paths_dialog.c
	* app/paths_dialogP.h
	* app/undo.c
	* app/tools.h
	* app/tools.c

	1) Fixed some problems with the paths tool. Now the tool suboption
	"new point" is selected automatically when appropriate. Eg if you
	have the "add point" suboption selected and click  on a point
	not on the curve the "new point" option will become selected and the
	new point will be added.

	2) The "new point" option is defaulted to on when a new image is created	or a new image is selected from the image menu.

	3) Move and flip tool now effect the path if it is locked.

	4) Edit stroke now uses the currently selected tool as it should do
	when stroking.
1999-10-18 20:55:25 +00:00
Sven Neumann 181c66985a Sorry for breaking the freeze, but I had these almost ready for weeks now...
--Sven
1999-09-09 01:47:54 +00:00
Michael Natterer 1e08aa1ef7 app/color_area.[ch] app/color_panel.[ch] enabled dnd for colors
1999-08-22  Michael Natterer  <mitschel@cs.tu-berlin.de>

	* app/color_area.[ch]
	* app/color_panel.[ch]
	* app/gimpdnd.[ch]: enabled dnd for colors (compatible with the
	standard gtk/gnome color dnd). The color selection is now invoked
	on a real click, not on button_down to avoid confusion with dnd.

	* app/channels_dialog.c
	* app/disp_callbacks.c
	* app/interface.c
	* app/layers_dialog.c: minor dnd updates/fixes.

	* app/channel.[ch]
	* app/channel_pvt.h
	* app/docindex.[ch]
	* app/docindexif.[ch]
	* app/drawable.[ch]
	* app/floating_sel.c
	* app/gimage.[ch]
	* app/gimage_mask.c
	* app/gimpdrawable.[ch]
	* app/gimpdrawableP.h
	* app/gimpimage.[ch]
	* app/gimpimageP.h
	* app/layer.[ch]
	* app/layer_pvt.h
	* app/undo.c
	* app/xcf.c: wanted to do some s/int/gboolean/ in the layer files
	where appropriate and found myself spending the whole night doing
	a big code review for layers/channels/drawables/images:
	s/int/gboolean/, s/<type>/g<type>/, lots of indentation, removed
	some old global variables and deprecated functions, #include
	cleanups, proper prototypes, copyright headers, ...
1999-08-22 11:45:31 +00:00
Tor Lillqvist f6858e21d1 Actually use the enum types GimpImageType, GimpImageBaseType,
* app/*.[ch]: Actually use the enum types GimpImageType,
	GimpImageBaseType, LayerModeEffects, PaintApplicationMode,
	BrushApplicationMode, GimpFillType and ConvertPaletteType, instead
	of just int or gint. Hopefully I catched most of the places
	where these should be used.

	Add an enum ConvolutionType, suffix the too general constants
	NORMAL, ABSOLUTE and NEGATIVE with _CONVOL. Use NORMAL_MODE
	instead of NORMAL in some places (this was what was intended). Fix
	some minor gccisms.

	* app/apptypes.h: New file. This file contains the above
	enumeration types, and some opaque struct typedefs. It was
	necessary to collect these in one header that doesn't include
	other headers, because when we started using the above mentioned
	types in the headers, all hell broke loose because of the
	spaghetti-like cross-inclusion mess between headers.

	(An example: Header A includes header B, which includes header C
	which includes A. B uses a type defined in A. This is not defined,
	because A hasn't defined it yet at the point where it includes B,
	and A included from B of course is skipped as we already are
	reading A.)
1999-08-18 23:41:39 +00:00
Michael Natterer 1058f41dab app/airbrush.c app/blend.c app/bucket_fill.c app/clone.c app/convolve.c
1999-07-06  Michael Natterer  <mitschel@cs.tu-berlin.de>

        * app/airbrush.c
        * app/blend.c
        * app/bucket_fill.c
        * app/clone.c
        * app/convolve.c
        * app/dodgeburn.c
        * app/eraser.c
        * app/ink.c
        * app/paintbrush.c
        * app/pencil.c
        * app/smudge.c: get opacity/paint mode from the current context
        (currently always the user context).

        * app/gimage_mask.c: the "stroke" command uses the paintbrush's
        settings if the current context is the user context and we are in
        per-tool paint options mode.

        * app/context_manager.[ch]
        * app/paint_options.h
        * app/preferences_dialog.c
        * app/tool_options.c
        * app/tools.c: moved the global/per-tool paint options switching
        to the context manager. The tool options themselves only contain
        the widgets for them now. This should fix the segfaults happening
        in per-tool mode.
	Removed the disclaimer from the prefs. dlg. as it seems to work
	now. The impl. in the context manager however is still a hack.

        * app/brush_select.c
        * app/brushes_cmds.c
        * tools/pdbgen/pdb/brushes.pdb: same as above.

        * app/lc_dialog.c: minimal code reduction. No functionality changed.
1999-07-06 15:18:25 +00:00
Michael Natterer ac98e8fa81 app/Makefile.am app/lc_dialog.[ch] app/lc_dialogP.h new files
1999-06-06  Michael Natterer  <mitschel@cs.tu-berlin.de>

	* app/Makefile.am
	* app/lc_dialog.[ch]
	* app/lc_dialogP.h
	* app/paths_dialogP.h: new files

	* app/channels_dialog.[ch]
	* app/layers_dialog.[ch]
	* app/layers_dialogP.h
	* app/paths_dialog.[ch]
	* app/menus.[ch]
	* app/file_new_dialog.c: modified

	- Moved the toplevel L&C dialog code to lc_dialog.[ch]. Only
	  these files need knowledge about how to create/update/...
	  the sub-dialogs, so the corresp. functions are defined in
	  lc_dialogP.h.
	- The popup menus are now created by menus.c. The command
	  callbacks are defined in [layers|channels|paths]_dialog.h.
	- Private functions to be used by "friend files" are defined in
	  [layers|paths]_dialogP.h.
	- Changed the order of the ops_buttons in the paths dialog to
	  match the order in the layers and channels dialogs.
	- The paint mode menu and preview stuff still needs to go out of
	  layers_dialog.[ch].
	- I'm not sure about the keybindings in the layer dialog's "Stack"
	  submenu because the list widget has it's own idea of PageUp/Down.
	- Hopefully fixed the update problem with new images by calling
	  lc_dialog_flush() after creating a new image.

	* app/app_procs.c
	* app/bezier_select.c
	* app/commands.c
	* app/floating_sel.c
	* app/gdisplay.c
	* app/gimage.c
	* app/gimage_mask.c
	* app/paint_core.c
	* app/preferences_dialog.c
	* app/transform_core.c
	* app/undo.c: changed #include's according to the new L&C file
	structure.
1999-06-06 17:26:51 +00:00
Michael Natterer c0b24ce90b app/channel.[ch] app/commands.c app/gimage_mask.[ch]
1999-05-07  Michael Natterer  <mitschel@cs.tu-berlin.de>

	* app/channel.[ch]
	* app/commands.c
	* app/gimage_mask.[ch]
	* app/gimage_mask_cmds.c
	* tools/pdbgen/pdb/gimage_mask.pdb
	* app/interface.c: propagated the indepentent x/y values for
	shrink/grow/border to the interface but not yet to the PDB.

	* app/*_select.c
	* app/paint_funcs.[ch]: implemented indep. x/y feather. It seems
	that cut-and-paste was sufficient, but I didn't really understand
	the code. Jay, could you have a look at this please?

	If the feather/shrink/... amount is specified in pixels,
	everything behaves like before.
	I'm not sure how the built-in feather option of the selection
	tools should behave, so it still defaults to 'pixel' mode.
	Moved the static feather/shrink/... values from gimage_mask.c to
	commands.c because they belong to the interface.

	* app/text_tool_cmds.c
	* tools/pdbgen/pdb/text_tool.pdb: prepared for resolution
	support, but didn't enable it yet.

	* app/unit_cmds.c
	* tool/pdbgen/pdb/unit.pdb: fixed a help text.
1999-05-06 23:10:29 +00:00
Michael Natterer ca2cbd3257 First version of per-tool paint options. No PDB interface yet. The tool
1999-04-22  Michael Natterer  <mitschel@cs.tu-berlin.de>

	First version of per-tool paint options. No PDB interface yet.
	The tool options dialog got rather big when in per-tool mode, so
	it will probably have to become a notebook.

	It's not yet 100% consistent. If switched off, everything should
	behave exactly like before.

	* app/Makefile.am
	* app/paint_options.h: new file

	* app/tool_options.c: PaintOptions gui. Maintain a list of all
	paint tools' ToolOptions to enable switching between global and
	per-tool paint options.

	* app/brush_select.[ch]: changed packing boxes, tables, ...
	The paint options in the brush selection can be hidden now.
	Moved create_paint_mode_menu() to paint_options.h and
	tool_options.c and renamed it to paint_mode_menu_new().

	* app/gimage_mask.c
	* app/gimpbrush.[ch]
	* app/gimpbrushlist.[ch]
	* app/paint_core.c: moved gimp_brush_[set|get]_spacing() from
	gimpbrushlist.[ch] to gimpbrush.[ch].
	Moved gimp_brush_[get|set]_[opacity|paint_mode]() to
	paint_options.h and tool_options.c and renamed them to
	paint_options_*_*().  They are "global paint options" now.

	* app/airbrush.c
	* app/blend.c
	* app/bucket_fill.c
	* app/clone.c
	* app/convolve.c
	* app/eraser.c
	* app/ink.c
	* app/paintbrush.c
	* app/pencil.c: all paint tools' options are derived from
	"PaintOptions" now. Opacity and paint mode are obtained through
	macros which take into account the current paint options mode.

	* app/buildmenu.h: #include <gtk/gtk.h>

	* app/color_picker.c
	* app/text_tool.c: changed spacings.

	* app/gimprc.[ch]: new gimprc option "global-paint-options"

	* app/preferences_dialog.c: Added a "Tool Options" page. Code
	cleanup. Some work on the convenience constructors test site.

	* app/tools.c: fixed "unused variable" warning.
1999-04-22 14:34:00 +00:00
Michael Natterer f70fc7d307 made function headers ansi compliant.
1999-04-02  Michael Natterer  <mitschel@cs.tu-berlin.de>

	* app/gimage_mask.[ch]: made function headers ansi compliant.

	* app/file_new_dialog.c
	* app/preferences_dialog.c: minor GUI and signal handling
	changes. Added a WM hint pixmap to the prefs dialog but commented
	it out because it looked ugly. If someone has a nice pixmap,
	please try it and tell me ;)

	* app/color_picker.c
	* app/crop.c
	* app/info_window.c
	* app/perspective_tool.c
	* app/rotate_tool.c
	* app/scale_tool.c
	* app/info_dialog.[ch]: the info_dialog allows scales, spinbuttons
	and sizeentries now. Made some dialogs use these widgets and
	added unit support. Sprinkled some g_snprintf's, removed
	#include's, ansi issues, ...

	* app/session.c: don't call a NULL callback.

	* libgimp/gimpsizeentry.[ch]: new function
	gimp_size_entry_add_field() which allows a more flexible GUI
	layout. More intelligent signal handling.
1999-04-02 19:46:59 +00:00
Manish Singh cb80e23d3b applied gimp-stric-981116-1, lots o files changes in app. i18n patch.
* applied gimp-stric-981116-1, lots o files changes in app. i18n patch.

* plug-ins/gfig/gfig.c: applied gimp-tml-981121-0, use proper PDB params

-Yosh
1998-11-23 14:47:09 +00:00
scott 85393964a0 Another tile tweak. This one eliminates tile levels (which add
bookkeeping without being used).  Made copy_region more intelligent on
when to use tile sharing; some changes made to pixel_regions to
facilitate this.  Fixed a refcount problem with xcf load and probably
a few other bugs that I've forgotten about.  Added a sanity check in
set_undo_tiles to help with a problem larry is reporting with airbrush
and xinput.  --sg
1998-08-15 19:17:36 +00:00
jaycox b7d8e6ea91 Modified Files: ChangeLog app/Makefile.am app/airbrush.c app/app_procs.c
Modified Files:
 	ChangeLog app/Makefile.am app/airbrush.c app/app_procs.c
 	app/brush_select.c app/brush_select.h app/clone.c
 	app/colormaps.c app/commands.c app/convolve.c app/devices.c
 	app/eraser.c app/gimage_mask.c app/gimpobject.h app/ink.c
 	app/internal_procs.c app/paint_core.c app/paint_core.h
 	app/paintbrush.c app/pencil.c app/preferences_dialog.c
      Minor modifications to support new brush functionality

 Added Files:
 	app/brush_edit.c app/brush_edit.h app/gimpbrush.c
 	app/gimpbrush.h app/gimpbrushgenerated.c
 	app/gimpbrushgenerated.h app/gimpbrushlist.c
 	app/gimpbrushlist.h
      new files to support vector generated brushes and
      reorganization/objectification of the brush class

 Removed Files:
 	app/brushes.c app/brushes.h
    Obsoleted by gimpbrush.? and gimpbrushlist.?

 ----------------------------------------------------------------------
1998-07-09 05:31:06 +00:00
scott 192256a01b app/gimage_mask.c (gimage_mask_boundary): fixed crash when you delete
the last layer of an image.
--sg
1998-07-07 01:39:31 +00:00
Lauri Alanko ef3e162eae start collecting some core stuff to libgimpim.a
Started separating crud out of drawables.

	Isolated the id system of images entirely within pdb. Even the
	window titles and menus use pointers instead of ids. Should at
	least remind people that this is a developers' version. :)
1998-06-30 15:31:32 +00:00
Lauri Alanko faeaa7cc23 Removed most of the image id system. They're still used with pdb.
At quick glance, nothing seems to be broken, but if things weird
	out, blame me.

	Now just the same for layers, channels and displays...
1998-06-29 00:24:44 +00:00
Manish Singh 1d95a05af0 gimp_message. libgimp also overrides g_message for all plugins. Converted
* redid the error message handling. g_message now calls message_box or prints
to console depending on whether the no_interface is set or not. gimp-message
is also exported to the PDB as a wrapper to g_message, and libgimp has a new
API: gimp_message. libgimp also overrides g_message for all plugins. Converted
lots of messages in app/* to g_message. Made script-fu a little friendlier.

* updated the regex code from grep 2.2

* said goodbye to the old script-fu logo in script-fu.h

-Yosh
1998-05-28 09:03:57 +00:00
Manish Singh 84abd5d700 Have fun recompiling gimp everyone. It's the great FSF address change!
-Yosh
1998-04-13 05:44:11 +00:00
Manish Singh 09a5fde1ce app/gimage_mask.c applied patch from Ben Jackson to fix fractional pixel
* app/gimage_mask.c
* app/paint_core.c: applied patch from Ben Jackson to fix fractional pixel
errors and reverted the old fix.

* app/paint_funcs.h: changed the #defines for ERASE_MODE and REPLACE_MODE to
correctly match layer_modes[]

-Yosh
1998-03-24 02:18:58 +00:00
Raph Levien 9c15ca2b09 I put a hack into gimage_mask_stroke to work around roundoff errors in
paint_core_subsample_mask, addressing Ben Jackson's Stroked pixel bug.
1998-01-28 06:34:28 +00:00
Manish Singh 2ce0e15023 Misc changes for .18
* app/indexed_palette.c: fix for wrong color selected in indexed
        palette dialog

        * app/xcf.c: don't crash on bad input (0 byte files)

        * app/plug_in.h
        * app/plug_in.c: fixes Gimp's most obscure bug. Failed plugin
        queries are handle correctly now

        * app/commands.c: added marching ants speed to preferences

        * plug-ins/tiff/tiff.c: correction for inversion for MINISWHITE
        images without alpha

        * plug-ins/pcx/pcx.c: updated to new version

        * app/paint_funcs.h: changed OPAQUE and TRANSPARENT to
        OPAQUE_OPACITY and TRANSPARENT_OPACITY to avoid possible
        conflicts. All affects .c files changed.

-Yosh
1998-01-25 01:24:46 +00:00
scott c267c55bbe Rewrite to make drawables (layers, channels, layer masks) into GtkObjects.
--sg
1998-01-22 07:02:57 +00:00
Elliot Lee 32cefec8f7 Initial revision 1997-11-24 22:05:25 +00:00