1999-09-01 Tor Lillqvist <tml@iki.fi>
* app/appenv.h
* libgimp/gimpmath.h: New file. Includes <math.h>. Move G_PI,
RINT(), ROUND() etc from app/appenv.h here, so plug-ins can
use them, too. Remove some commented-out old stuff in appenv.h.
* libgimp/gimp.h: Include gimpmath.h.
* libgimp/gimp.c (gimp_main): Win32: Don't install signal
handlers, we can't do anything useful in the handler ourselves
anyway (it would be nice to print out a backtrace, but that seems
pretty hard to do, even if not impossible). Let Windows inform the
user about the crash. If the plug-in was compiled with MSVC, and
the user also has it, she is offered a chance to start the
debugger automatically anyway.
* app/*several*.c: Include gimpmath.h for G_PI etc. Don't include
<math.h>, as gimpmath.h includes it.
* plug-ins/*/*many*.c: Include config.h. Don't include <math.h>.
Remove all the duplicated definitions of G_PI and rint(). Use
RINT() instead of rint().
* app/app_procs.[ch]: app_exit() takes a gboolean.
* app/batch.c
* app/commands.c
* app/interface.c: Call app_exit() with FALSE or TRUE.
* app/main.c (on_error): Call gimp_fatal_error. (main): Don't
install any signal handler on Win32 here, either.
* app/errors.c (gimp_fatal_error, gimp_terminate): Win32: Format
the message and call MessageBox with it. g_on_error_query doesn't
do anything useful on Win32, and printf'ing a message to stdout or
stderr doesn't do anything, either, in a windowing application.
* app/apptypes.h: added InterpolationType enum.
* app/gimprc.[ch], app/preferences_dialog.c: replaced
cubic_interpolation flag with interpolation_type variable.
* app/pixel_region.[ch]: added pixel_region_has_alpha function.
* app/paint_funcs.c: rewrote scale_region. It now behaves
correctly on images with alpha, no longer leaves an artifact on the
right edge of images when scailing up, and runs signifigantly
faster.
* 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.)
* app/appenv.h: Define ROUND(), RINT(), SQR(), G_PI and
G_PI_4. The latter two will presumably eventually be in
GLib. RINT() calls rint() if we have it, otherwise adds 0.5 and
calls floor().
* app/*.c: Remove the multiple identical definitions of M_PI. Use
G_PI instead of M_PI. Remove ROUND() and rint() definitions. Use
RINT() instead of rint().
* app/paint_funcs.c, app/transform_core.c: replace the cubic
functions with a better/faster version supplied by
David Hodson <hodsond@acm.org>
* app/brush_select.c: double clicking on a brush preview now opens up
the brush editor. Update the text displayed when the active brush
changes size.
* app/paint_funcs.c: slight modification to overlay_pixels.
* configure.in: Check for mmap.
* app/makefile.msc: Depend on gimpi.lib.
* app/app_procs.c (app_init): Fix gccism: Allocate filenames (an
array with non-constant size) dynamically.
* app/{datafiles,fileops,general,install,module_db,temp_buf}.c:
Include glib.h before standard headers, because of certain obscure
details related to compiling with gcc on Win32.
(If you really want to know: glib.h defines he names of POSIXish
(but non-ANSI) functions as prefixed with underscore, because
that's how they are named in the msvcrt runtime C library we want
to use. However, defining stat as _stat causes some problems if
done after including the mingw32 <sys/stat.h>. So, it's easiest to
include <glib.h> early.)
* app/main.c: Use _stdcall and __argc, __argv with MSC, but
__attribute__((stdcall)) and _argc, _argv with gcc. Don't print
the "Passed serialization test" message on Win32. (It would open
up an otherwise unnecessary console window.)
* app/paint_funcs.c (gaussian_blur_region): Don't use variable sum
until initialized.
* app/{bezier_select,paths_dialog}.c: Include config.h and define
rint() if necessary.
* app/plug_in.c: Use _spawnv, not spawnv, on Win32 and OS/2.
Sun May 23 13:37:53 BST 1999 Adam D. Moss <adam@gimp.org>
* app/paint_funcs.c: Removed bogosity of previous fix and
optimized a little. Cleaner, faster and hopefully more correct
now.
Sun May 23 02:35:57 BST 1999 Adam D. Moss <adam@gimp.org>
* app/paint_funcs.c: Fixed a preserve-transparency
bug w/blend tool and possibly elsewhere. Allowed
the opacity-quickskip rule to be applied more generously.
Be a bit lazier with row-hint re-evalution (tnx j).
Sun May 9 16:23:47 BST 1999 Adam D. Moss <adam@gimp.org>
* app/tile.c
* app/tile.h
* app/tile_manager.c
* app/tile_pvt.h
* app/paint_funcs.c:
Added Tile Row Hinting to the GIMP tile structure. Tiles
now have cheap per-row hints indicating whether each row is
all-transparent, all-opaque, a mixture, or other properties.
These hints are automatically invalidated when the tile is checked
in as dirty, and are re-evaluated on demand.
Currently only the layer compositing routines take advantage
of these hints, though there is opportunity to use them to
advantage in numerous other places.
The whole layer compositing process is typically 2x-4x faster
now, especially on subsequent renders of data which has already
had its hints calculated.
See tile.h for the explicit TileRowHint query/set interface.
The procedure to re-evaluate tile hints currently resides in
paint_funcs.c but may be exposed to other parts of the core
if necessary.
This is experimental. Please report mis-rendering problems.
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.
* pixmaps/mouse1*: new bitmap files containing the new mouse cursors.
* app/parasitelist.c: use g_str_equal instead of parasite_compare_func.
* app/paint_core.c: interpret perfectmouse right way round.
* app/rect_select{P,}.[ch]: set custom cursors when the operation type
changes. Centralize the calculation of op based on the modifier
keys being held.
* app/fuzzy_select.c, app/free_select.c: allow the rect_select
functions calculate the operation type.
* app/ellipse_select.c: use the SelectionOps typedefs.
* app/edit_selection.c: convert MaskToLayerTranslate into
FloatingSelTranslate if there is already a floating selection in
init_edit_selection.
* app/disp_callbacks.c: fixed the calculation of state.
* app/gdisplay.[ch], app/cursorutil.[ch]: new functions to allow
the loading of customized cursors.
* app/paint_funcs.[ch], app/channel.c: border_region now accepts
seperate xradius and yradius arguments.
* Makefile.am: listed tools first in SUBDIRS, so xgettext can grab
the autogenned files
* acconfig.h: removed unused HAVE_XSHM_H
* tools/pdbgen/app.pl: added proc invoke method, nicer header
formatting
* tools/pdbgen/pdb/layer.pdb: use layer_mask type for return value
for layer_create_mask
* tools/pdbgen/pdb/misc.pdb: added quit proc
* tools/pdbgen/pdb/tools.pdb: added ink proc, but not added to @procs
since it's incomplete
* tools/pdbgen/pdb/fileops.pdb: new file
* app/Makefile.am: added fileops_cmds.c
* app/app_procs.c
* app/fileops.c
* app/ink.c: removed PDB procs (the one in ink.c was incomplete)
* app/fileops.h: exported load_procs, save_procs, and file_proc_find()
* app/plug_in.h: exported enum, #include <sys/types.h>
* app/brushes_cmds.c
* app/fileops_cmds.c
* app/layer_cmds.c
* app/misc_cmds.c
* app/parasite_cmds.c
* app/patterns_cmds.c
* app/procedural_db_cmds.c
* app/text_tool_cmds.c
* app/internal_procs.c: pdbgen updates
* app/paint_funcs.c: the glibc 2.1 docs say using SVID threadsafe
random functions are preferable to rand_r, so use them instead of
a mutex
-Yosh
* app/paint_funcs.[ch]: Added an edge_lock parameter to
thin_region. Split the radius parameter into xradius and yradius
in thin_region and fatten_region.
* app/channel.c: fixed a bug in channel_bounds that I introduced
last time I tried to fix a bug in channel_bounds. Minor
modifications to work with the improved thin/fatten region
functions.
* app/ops_buttons.h: removed a c++ style comment
* app/paint_funcs.c: applied Craig Wiegert's patch to fix
the rounding errors in the scaling code.
* app/paint_funcs.c: Use a mutex lock in disolve pixels instead of
rand_r on linux systems since linux's rand_r appears to be broken.
* app/bezier_select.c: applied Shuji Narazaki's patch that corrects
for layer offsets in bezier_stroke.
* app/Makefile.am: added gimphistogram*, histogramwidget*,
removed histogram.[ch]
* app/histogram.[ch]: removed. replaced with histogramwidget.[ch].
* app/{gimphistogramP.h, gimphistogram.h, gimphistogram.c}: new
functions that calculate histograms in parallel and perform
calculations on them.
* app/histogramwidget.[ch]: Same as old histogram.[ch], only it is
now a real widget, and it uses GimpHistograms instead of arrays of
values.
* app/curves.c: #include gimphistogram.h instead of histogram.h.
* app/equalize.c: use GimpHistogram and GimpLut.
* app/gimpbrush.c, app/gimpimage.c, app/gimpset.c: use
GTK_RUN_FIRST in calls to gimp_signal_new.
* app/histogram_tool.c, app/levels.c, app/threshold.c: modified to
use the new HistogramWidget.
* app/paint_funcs.c: removed some unused variables.
* app/preferences_dialog.c: only display the num-processor field
if we are configured --with-mp
* plug-ins/gee/gee.c: removed a couple of c++ style comments.
done in pieces, don't expect to be able to compile on Win32 from
these sources yet. Ans of course, the official version of GTk+
doesn't include the Win32 stuff yet.
* app/color_balance.c: optimized by using a lookup table
* app/paint_funcs.c: parallelized apply_mask_to_region,
combine_mask_and_region, and initial_region. Use rand_r
if we are multithreaded.
Sun Jan 31 16:51:18 GMT 1999 Adam D. Moss <adam@gimp.org>
* app/paint_funcs.c: Fix segfault when combining very
tiny inten_a_inten_a regions (ie. when painting).
Sat Jan 23 18:43:23 GMT 1999 Adam D. Moss <adam@gimp.org>
* plug-ins/gif/gif.c: Multi-line comments, a little more
sanity-checking.
* app/convert.c: Cosmetic changes to the warning about having
too many colours for saving transparent/animated GIFs.
* app/gdisplay.c: Titlebar is correctly updated upon revert.
* app/paint_funcs.c: Minor improvement.
* docs/parasites.txt: Minor amendments.
* plug-ins/jpeg/jpeg.c: Minor code comment amendments.
Mon Jan 11 22:02:10 GMT 1999 Adam D. Moss <adam@gimp.org>
* app/paint_funcs.c:
The bottleneck combine_inten_a_and_inten_a_pixels()
function is a couple of times faster when there is a
layer mask, for the common case, due to working with whole
word-aligned ints where feasible instead of a char at a time.
The same optimization could be implemented in lots of other
places, but I'm going to bed. Good night!
* app/gimage_cmds.c: #include <cursorutil.h>
* libgimp/gserialize.c
* libgimp/gserialize.h: Changed the enum values to allow for
simpler future expansion.
* libgimp/parasite.c
* libgimp/parasite.h: s/persistant/persistent/.
new accessor functions for parasites. #defines for new flags.
* app/paintbrush.c: added timeing code for brush strokes.
It is #ifed out, and is only valid for shift clicks.
* app/parasite_cmds.h: fixed a warning
* app/parasitelist.h
* app/parasitelist.c: added _for_each and _length functions
* app/gimpdrawable.c: set the dirty flag when adding or removing a
persistent parasite
* app/gimpimage.c: set the dirty flag when adding or removing a
persistent parasite. Fixed bug and removed debug statements in
merge_down.
* app/xcf.c: save and load resolution, parasites, and tattoos.
* app/main.c: updated the deserialize test.
* plug-ins/tiff/tiff.c
* plug-ins/gif/gif.c: use PARASITE_PERSISTENT define instead of 1
* plug-ins/bmp/bmp.c
* plug-ins/bmp/bmp.h: declare some struct variable as extern.
* app/paint_funcs.c: Lots of optimizations aimed at speeding up
painting. Should see a 2-4X speed up on most painting
(depending on paint modes, brush size etc.)
* app/drawable.c: check for NULL drawable in drawable_ID.
this stops us from being crashed by ill-behaved plug-ins
* libgimp/Makefile.am
* configure.in: fix --disable-static compilation
* gimptool.in: use the right dir for scripts. Strip out path
from the compiled bin
* app/colormaps.c: comment out unused gamma_correct function
* app/layer.c: #include "libgimp/parasite.h"
* app/paint_funcs.c: convert icky C++ comments
* plug-ins/mosaic/mosaic.c
* plug-ins/cubism/cubism.c: cleanups
* plug-ins/libgck/gck/gckcolor.c: fix adaptive supersampling bug
-Yosh
Wed Oct 14 17:46:15 EDT 1998 Adrian Likins <adrian@gimp.org>
* app/*, po/de.po, de/POTFILES.in, libgimp/gimpintl.h:
Lots of ii8n stuff here and some additions to the de.po.
Applied gimp-egger-981005-1 ,gimp-egger-981006-1,
gimp-egger-981007-1, gimp-egger-981008-1,
gimp-egger-981009-1.patch, gimp-egger-981010-1.patch
* plug-in/guillotine/guillotine.c: added the coordinates
of the split images from the original image to the title.
ie foo.jpg (0,0) for the image in the topleft.
* plug-in/script-fu/scripts/neon-logo.scm,
perspective-shadow.scm, predator.scm,rendermap.scm,
ripply-anim.scm, select_to_image.scm,swirltile.scm,
xach-effect.scm: updated scripts to use new script-fu stuff
wooo boy! a big un!
in testing this, it looks like some of the po files are busted.
but the code stuff seems okay.
-adrian
Sun Sep 27 13:53:03 BST 1998 Adam D. Moss <adam@gimp.org>
* app/paint_funcs.c: Fixed a bug in color_only_pixels(),
fixed a possible bug in border_region().
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
----------------------------------------------------------------------
Modified Files:
ChangeLog app/paint_funcs.c
speed up to color_pixels (4-7X on a mips r4000)
----------------------------------------------------------------------