Commit Graph

30 Commits

Author SHA1 Message Date
Michael Natterer 48729e774c libgimpcolor/gimpbilinear.c fix some uninitialized stuff gcc 4.0 was
2005-07-08  Michael Natterer  <mitch@gimp.org>

	* libgimpcolor/gimpbilinear.c
	* libgimpwidgets/gimppreviewarea.c: fix some uninitialized stuff
	gcc 4.0 was choking about.
2005-07-08 18:18:00 +00:00
Sven Neumann 5c6dae19dc improved docs.
2005-01-21  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreviewarea.c: improved docs.

2005-01-22  Sven Neumann  <sven@gimp.org>

	* app/app-docs.sgml
	* app/app-sections.txt
	* app/app.types
	* libgimpwidgets/libgimpwidgets-docs.sgml
	* libgimpwidgets/libgimpwidgets-sections.txt
	* libgimpwidgets/libgimpwidgets.types: GimpEnumStore and
	GimpEnumComboBox moved to libgimpwidgets.

	* libgimpwidgets/tmpl/gimpenumcombobox.sgml
	* libgimpwidgets/tmpl/gimpenumstore.sgml: new files.
2005-01-21 23:11:43 +00:00
Sven Neumann 59b87864f4 added some checks to avoid division by zero.
2004-12-27  Sven Neumann  <sven@gimp.org>

	* libgimp/gimpregioniterator.c: added some checks to avoid
	division by zero.

	* libgimpwidgets/gimppreviewarea.[ch]: minor cleanups, improved
	API documentation.
2004-12-27 10:24:16 +00:00
Michael Natterer 998c895a67 More final API cleanup:
2004-11-02  Michael Natterer  <mitch@gimp.org>

	More final API cleanup:

	* tools/pdbgen/pdb/image.pdb: added gimp_image_set,get_colormap()
	and deprecated set,get_cmap().

	* libgimpwidgets/gimppreviewarea.[ch]: renamed
	gimp_preview_area_set_cmap() to set_colormap().

	* libgimp/gimp.def
	* libgimp/gimpdrawablepreview.c
	* libgimp/gimpexport.c
	* libgimp/gimpimage.[ch]
	* libgimpwidgets/gimpwidgets.def: changed accordingly.

	* app/pdb/image_cmds.c
	* app/pdb/internal_procs.c
	* libgimp/gimpimage_pdb.[ch]: regenerated.

	(undeprecation of plug-ins will follow...)
2004-11-02 11:30:49 +00:00
Michael Natterer 6711646648 Don't store human readable and translatable enum/flag strings in
2004-10-25  Michael Natterer  <mitch@gimp.org>

	Don't store human readable and translatable enum/flag strings in
	GEnumValue's and GTypeValue's fields but attach them to their
	GType using separate structs and utility functions:

	* tools/gimp-mkenums: added params and perl voodoo to support
	generating a second array of values, which is used by the
	Makefiles below to create and register arrays of value
	descriptions.

	* libgimpbase/gimpbasetypes.[ch]: added API to attach/retreive
	arrays of translatable strings to/from enum and flags types. Added
	structs GimpEnumDesc and GimpFlagsDesc for that purpose.

	* libgimpbase/gimputils.[ch]: changed existing enum utility
	functions, added new ones and added a symmetric API for flags.

	* app/base/Makefile.am
	* app/core/Makefile.am
	* app/display/Makefile.am
	* app/paint/Makefile.am
	* app/text/Makefile.am
	* app/tools/Makefile.am
	* app/widgets/Makefile.am
	* libgimp/Makefile.am
	* libgimpbase/Makefile.am: changed *-enums.c generation rules
	accordingly.

	* app/base/base-enums.c
	* app/core/core-enums.c
	* app/display/display-enums.c
	* app/paint/paint-enums.c
	* app/text/text-enums.c
	* app/tools/tools-enums.c
	* app/widgets/widgets-enums.c
	* libgimpbase/gimpbaseenums.c: regenerated.

	* app/widgets/gimpenumstore.c
	* app/widgets/gimpenumwidgets.c
	* app/widgets/gimptemplateeditor.c
	* libgimpwidgets/gimppreviewarea.c: follow the enum utility
	function API changes.
2004-10-25 17:55:25 +00:00
Sven Neumann 5f1373436c fixed code that handles drawing outside of the preview area.
2004-09-15  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreviewarea.c
	(gimp_preview_area_[draw|blend|mask]): fixed code that handles
	drawing outside of the preview area.

	* plug-ins/common/unsharp.c (preview_update): draw the preview
	directly from the pixel region.
2004-09-15 20:51:00 +00:00
Sven Neumann e9d5536720 libgimpwidgets/gimppreview.c documented new functions.
2004-09-10  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreview.c
	* libgimpwidgets/gimppreviewarea.c: documented new functions.
2004-09-09 22:36:15 +00:00
Sven Neumann 8a80b8e73e fixed coding style issues 2004-09-09 17:13:58 +00:00
David Odin 3f099b0660 added a utility function gimp_preview_area_queue_draw(), which queue the
* libgimpwidgets/gimppreviewarea.c: added a utility function
  gimp_preview_area_queue_draw(), which queue the right part of the
  preview to be redrawn. And use it in all the drawing functions. This
  fix a problem where the preview wasn't updated correctly after a
  resize.
2004-09-09 17:11:16 +00:00
Sven Neumann a514ce7db1 allow to set a maximum size and center the preview area if its allocation
2004-09-09  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreviewarea.[ch]: allow to set a maximum size
	and center the preview area if its allocation extends the maximum.

	* libgimpwidgets/gimppreview.[ch]: derive from GtkVBox, moved the
	toggle button out of the table and put the table into an aspect
	frame. Added an API to set the preview boundaries. Set the maximum
	size of the GimpPreviewArea from that function.

	* libgimpwidgets/gimpwidgets.def: added new entries.

	* libgimp/gimpdrawablepreview.c: use gimp_preview_set_bounds().

	* plug-ins/common/gauss.c: pack the preview widget so that it
	resizes with the dialog.
2004-09-09 14:47:39 +00:00
David Odin 824b5289db optimized the case where both buffers have the same alpha for a given
* libgimpwidgets/gimppreviewarea.c (gimp_preview_area_blend)
  (gimp_preview_area_mask): optimized the case where both buffers have
  the same alpha for a given pixel.
2004-09-09 13:22:27 +00:00
David Odin ee2e6eac86 fixed a stupid typo.
* libgimpwidgets/gimppreviewarea.c: fixed a stupid typo.
2004-09-08 14:51:02 +00:00
Sven Neumann 7f075c87d8 optimized solid color fills.
2004-09-08  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreviewarea.c (gimp_preview_area_fill):
	optimized solid color fills.
2004-09-08 12:54:36 +00:00
Sven Neumann 1a9fdcda80 factored out common code. Reduced indentation level by closing a switch
2004-09-08  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreviewarea.c: factored out common code.
	Reduced indentation level by closing a switch earlier.
2004-09-08 12:37:09 +00:00
David Odin c59a6de934 use gimp_preview_area_draw when the opacity is 0 or 255, instead of
*  libgimpwidgets/gimppreviewarea.c: (gimp_preview_area_blend)
  use gimp_preview_area_draw when the opacity is 0 or 255, instead of
  duplicating code.
2004-09-08 11:52:05 +00:00
David Odin e733ca0930 libgimpwidgets/gimppreviewarea.c added two functions:
* libgimpwidgets/gimppreviewarea.c
* libgimpwidgets/gimppreviewarea.h: added two functions:
  gimp_preview_area_blend() to draw the blending of two buffers with
  an opacity parameter, and gimp_preview_area_mask() to draw the
  blending of two buffers, with a mask buffer. The code still needs some
  polish, though.

* libgimp/gimpdrawablepreview.c
* libgimp/gimpdrawablepreview.h: use gimp_preview_area_mask() in
  gimp_drawable_preview_draw(), so the previews are now much more
  accurate (respecting the selection, if any).

Also made the buf parameter of gimp_drawable_preview_draw() a pointer
to constants.
2004-09-07 20:20:13 +00:00
Sven Neumann 6ece077f87 pass a GdkEventButton to gimp_preview_area_menu_popup().
2004-09-04  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreviewarea.[ch]: pass a GdkEventButton to
	gimp_preview_area_menu_popup().

	* libgimpwidgets/gimppreview.c: implement GtkWidget::popup_menu().
2004-09-03 23:41:39 +00:00
Sven Neumann ecca201aa9 added gimp_preview_area_menu_popup(). Not completely finished yet...
2004-09-03  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreviewarea.[ch]: added
	gimp_preview_area_menu_popup(). Not completely finished yet...

	* libgimpwidgets/gimppreview.c: use the new function.
2004-09-03 19:34:59 +00:00
Sven Neumann a1e5a55c7d removed unused function 2004-09-03 13:07:22 +00:00
Sven Neumann 9b314d0e81 swapped light and gray checks to get a checkerboard that matches the image
2004-09-03  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreviewarea.c (CHECK_COLOR): swapped light
	and gray checks to get a checkerboard that matches the image window.
2004-09-03 12:57:35 +00:00
Sven Neumann 4fbc8764b4 libgimpbase/Makefile.am libgimpbase/gimpchecks.[ch] added
2004-09-03  Sven Neumann  <sven@gimp.org>

	* libgimpbase/Makefile.am
	* libgimpbase/gimpchecks.[ch] added gimp_checks_get_shades().

	* app/base/temp-buf.c
	* app/display/gimpdisplayshell-render.c
	* libgimpwidgets/gimppreviewarea.c: use the new function instead
	of replicating these numbers in three different places.
2004-09-03 00:06:21 +00:00
Sven Neumann 3f4de431c1 light and dark check color were swapped for GIMP_CHECK_TYPE_GRAY_CHECKS.
2004-09-02  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell-render.c (check_combos): light and
	dark check color were swapped for GIMP_CHECK_TYPE_GRAY_CHECKS.

	* libgimpwidgets/gimppreviewarea.[ch]: added "check-size" and
	"check-type" properties and draw the checkerboard accordingly.
2004-09-02 15:39:07 +00:00
Sven Neumann e397e4abc4 oops, swapped x and y variables.
2004-09-01  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreviewarea.c (CHECK_COLOR): oops, swapped x
	and y variables.
2004-09-01 08:50:52 +00:00
Sven Neumann 3a0e874522 added new function gimp_preview_area_set_offsets().
2004-09-01  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreviewarea.[ch]: added new function
	gimp_preview_area_set_offsets().

	* libgimpwidgets/gimppreview.c: use the new function to let the
	checkerboard scroll with the preview.
2004-09-01 01:18:19 +00:00
David Odin e08e1d746b fixed the rendering for INDEXED and INDEXEDA image types.
* libgimpwidgets/gimppreviewarea.c: fixed the rendering for INDEXED
  and INDEXEDA image types.

* plug-ins/common/grid.c: ported to GimpPreviewArea.
2004-08-07 00:04:16 +00:00
Sven Neumann 96b9987210 added new function gimp_preview_area_fill().
2004-07-31  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreviewarea.[ch]: added new function
	gimp_preview_area_fill().

	* libgimpwidgets/test-preview-area.c: added a test for new function.

	* libgimp/gimpbrushmenu.c: ported to GimpPreviewArea.
2004-07-31 01:03:00 +00:00
Shlomi Fish 51a31ade29 corrected a typo causing mayhem in previews of non-alpha grayscale images.
* libgimpwidgets/gimppreviewarea.c (gimp_preview_area_draw): corrected a
typo causing mayhem in previews of non-alpha grayscale images.
Fixes bug #148873. (as reported by DindinX)
2004-07-30 14:38:11 +00:00
Sven Neumann 23197dc2ca optimized alpha blending.
2004-07-30  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreviewarea.c (gimp_preview_area_draw):
	optimized alpha blending.
2004-07-30 12:01:44 +00:00
Sven Neumann e948146662 only invalidate the buffer on size_allocate; allocate a new one on the
2004-07-29  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreviewarea.c: only invalidate the buffer
	on size_allocate; allocate a new one on the next call to
	gimp_preview_area_draw(). Fixed buffer offset in expose method.

	* libgimpwidgets/Makefile.am
	* libgimpwidgets/test-preview-area.c: more a benchmark than a
	test; quite similar to testrgb from the GTK+ source tree.
2004-07-29 21:08:13 +00:00
Sven Neumann c307429a24 libgimpwidgets/Makefile.am libgimpwidgets/gimpwidgets.def
2004-07-29  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/Makefile.am
	* libgimpwidgets/gimpwidgets.def
	* libgimpwidgets/gimpwidgets.h
	* libgimpwidgets/gimpwidgetstypes.h
	* libgimpwidgets/gimppreviewarea.[ch]: added GimpPreviewArea, a
	replacement for GtkPreview, loosely based on patches from Geert
	Jordaens and David Odin. Fixes bug #144759.

	* plug-ins/common/sharpen.c: use the new widget instead of a
	GtkPreview; saves about 100 lines of rather complex code :)
2004-07-29 17:10:28 +00:00