Begin to consider GimpObject::name as private and always use
gimp_object_get_name(). Change gimp_object_get_name() to take an
untyped pointer so we don't have to do so awfully many casts. There is
a runtime check for the type inside the function anyway.
2009-03-19 Sven Neumann <sven@gimp.org>
Bug 471681 – Keyboard shortcuts for brush size/params need
feedback
* app/core/gimpbrushgenerated.c
* app/core/gimpcontext.c
* app/paint/gimppaintoptions.c: applied patch from Stephen G.
that
marks some strings for translation.
svn path=/trunk/; revision=28182
2009-02-14 Sven Neumann <sven@gimp.org>
Bug 99457 – Support for dynamics on tilt
* app/core/gimpbrush.[ch]
* app/core/gimpbrushgenerated.c
* app/core/gimpbrush-transform.[ch]
* app/paint/gimpbrushcore.c
* app/paint/gimpsmudge.c: applied patch from Alexia Death,
separates brush scaling for x and y.
svn path=/trunk/; revision=28036
2009-02-05 Sven Neumann <sven@gimp.org>
Bug 520078 – Rotate brushes
Applied patch from Alexia Death:
* app/core/gimpbrush.[ch]
* app/core/gimpbrushgenerated.c
* app/core/gimpbrush-transform.[ch]: affine transformations for
brushes. So far only scaling and rotation is supported. The
transformation is done using nearest-neighbour. This is a
regression and we need to add back interpolation before the next
release.
* app/paint/gimpsmudge.c
* app/paint/gimppaintoptions.[ch]
* app/paint/gimpbrushcore.[ch]: allow to control the brush
rotation angle.
* app/tools/gimppaintoptions-gui.c
* app/tools/gimpbrushtool.c: added UI for controlling the
brush rotation angle.
* app/actions/tools-actions.c
* app/actions/tools-commands.[ch]: add actions for controlling
the
brush rotation angle.
svn path=/trunk/; revision=27987
Applied patch from Alexia Death that prepares brushes for
arbitrary transforms by renaming stuff with 'scale' to
'transform'. Takes us one step closer to fixing bug #520078.
* app/core/gimpbrush.[ch]
* app/core/gimpbrushgenerated.c
* app/paint/gimpbrushcore.[ch]
* app/paint/gimpsmudge.c
* app/core/gimpbrush-transform.[ch]: New names of
* app/core/gimpbrush-scale.[ch]
* app/core/Makefile.am: Update.
svn path=/trunk/; revision=27975
2009-01-17 Michael Natterer <mitch@gimp.org>
* all files with a GPL header and all COPYING files:
Change licence to GPLv3 (and to LGPLv3 for libgimp).
Cleaned up some copyright headers and regenerated the parsers in
the ImageMap plugin.
svn path=/trunk/; revision=27913
2008-03-11 Michael Natterer <mitch@gimp.org>
* app/core/gimpbrushgenerated.c: reorder and rename local
functions and prototypes to be consistent with other objects. Misc
minor cleanup.
svn path=/trunk/; revision=25083
2007-03-29 Sven Neumann <sven@gimp.org>
* app/core/gimpbrushgenerated.c (gimp_brush_generated_calc): moved
generation of the lookup table to it's own function. Also changed
SUPERSAMPLING from 5 to 4. Let's see if someone complains...
svn path=/trunk/; revision=22193
2007-03-14 Michael Natterer <mitch@gimp.org>
* app/core/gimpbrush.c
* app/core/gimpbrushgenerated.c: some minor fixes and stylistic
paranoia i overlooked in last night's late review.
svn path=/trunk/; revision=22119
2007-03-14 Martin Nordholts <martinn@svn.gnome.org>
Made brushes upscalable by using scale_region. Downscaling still
uses functions in app/base/brush-scale.c (because of better
performance). Parametric brushes of course recalculates masks
instead of using bitmap scaling. Fixes bug #65030.
* app/core/gimpbrush.[ch]: Added a private scale_buf method which
uses scale_region (with GIMP_INTERPOLATION_LINEAR) to scale its
masks and pixmaps. Also added public virtual method scale_size to
GimpBrush (overridden by GimpBrushGenerated) which calculates the
buffer sizes for a given brush scaled with a given scale.
* app/core/gimpbrushgenerated.c: Implemented the new scale_size
method inherited from GimpBrush, and modified
gimp_brush_generated_calc to use this helper function.
* app/tools/gimppaintoptions-gui.c (gimp_paint_options_gui): Made
the brush Scale-slider logarithmic.
* app/paint/gimppaintoptions.c (gimp_paint_options_class_init):
Changed Scale scale to [0.0, 10.0].
* app/paint/gimpbrushcore.c:
(gimp_brush_core_calc_brush_size): Refactored 'get brush size' code
to where it belongs, in GimpBrush-classes, and allowed scales
larger than 1.0.
svn path=/trunk/; revision=22113
2007-03-12 Michael Natterer <mitch@gimp.org>
* app/core/gimpbrush.[ch]
* app/core/gimpbrushgenerated.c
* app/tools/gimppaintoptions-gui.c
* app/base/brush-scale.[ch]
* app/base/temp-buf.[ch]
* app/paint/gimppaintoptions.c
* app/paint/gimpbrushcore.c: revert last commit. The patch needs
more review and it's easier to start from quare one than have
patches on top of patches.
svn path=/trunk/; revision=22101
2007-03-11 Michael Schumacher <schumaml@cvs.gnome.org>
Made brushes scalable (both up and down) by using existing
scaling routines, and also refactored some brush-code. Patch by
Martin Nordholts. Fixes bug #65030.
* app/paint/gimpbrushcore.c:
(gimp_brush_core_calc_brush_length_scale) Refactored 'get brush
size' code to where it belongs, in GimpBrush-classes, and renamed
gimp_brush_core_calc_brush_size to
gimp_brush_core_calc_brush_length_scale.
* app/paint/gimppaintoptions.c (gimp_paint_options_class_init):
Changed Scale scale to [0.0, 100.0].
* app/base/temp-buf.[ch] (mask_buf_new): Change signature to also
take a bpp parameter.
* app/base/brush-scale.[ch]: Changed brush_scale_(mask|pixmap) to
the new brush_scale_buf, which uses existing scaling routines
(scale_region) instead of dedicated down-scaling only routines.
* app/tools/gimppaintoptions-gui.c (gimp_paint_options_gui): Made
the brush Scale-slider logarithmic.
* app/core/gimpbrushgenerated.c: Implemented the new
get_scaled_size method inherited from GimpBrush, and modified
gimp_brush_generated_calc to use this helper function.
* app/core/gimpbrush.[ch]: Added public virtual method
get_scaled_size to GimpBrush, overridden by GimpBrushGenerated,
which calculates the buffer sizes for a given brush scaled with a
given scale. Also changed calls to brush_scale_(mask|pixmap) to
the new brush_scale_buf.
svn path=/trunk/; revision=22099
2006-12-07 Michael Natterer <mitch@gimp.org>
* app/core/gimpbrush.c (gimp_brush_class_init)
* app/core/gimpbrushgenerated.c (gimp_brush_generated_new): gah,
should use the right binary for testing. Fixes the new spacing
property.
2006-12-06 Michael Natterer <mitch@gimp.org>
* app/core/gimpbrush.c: made "spacing" a property.
* app/core/gimpbrushgenerated-save.c
* app/core/gimpbrushgenerated.c
* app/core/gimpbrushpipe.c: use it. Don't access brush->spacing
manually, always use accessors.
2006-11-09 Michael Natterer <mitch@gimp.org>
Properly abstract brush scaling:
* app/core/gimpbrush.[ch]: added virtual functions
GimpBrush::scale_mask() and ::scale_pixmap() and default
implementations which call the functions in base/brush-scale.c.
* app/core/gimpbrushgenerated.c: factored out brush calculation to
an internal utility function and call that function from ::dirty()
and from the new ::scale_mask().
* app/core/gimpbrushcore.c: use gimp_brush_scale_mask/pixmap()
instead of using the lowlevel scale functions directly. Fixes the
uglyness that we were scaling generated brushes instead of simply
recalculating them in the right size.
2006-05-29 Sven Neumann <sven@gimp.org>
* app/core/gimpbrushgenerated.c (gimp_brush_generated_load): don't
choke on brush files with empty names (bug #343140).
(gimp_brush_generated_save): warn about brushes with empty names.
2006-05-23 Sven Neumann <sven@gimp.org>
It makes more sense to have GimpData::dirty indicate a name change
than to invalidate the previews whenever the name changes.
* app/core/gimpdata.c: call gimp_object_name_changed() from
gimp_data_real_dirty() instead of implementing
GimpObject::name-changed and calling gimp_data_dirty() from there.
* app/core/gimpbrushclipboard.c
* app/core/gimppalette.c
* app/core/gimppatternclipboard.c: call gimp_data_dirty() in place
of gimp_object_name_changed().
* app/core/gimpbrushgenerated.c (gimp_brush_generated_dirty):
chain up unconditionally.
2006-01-18 Michael Natterer <mitch@gimp.org>
* app/config/config-types.c: define GIMP_PARAM_STATIC_STRINGS
which is G_PARAM_STATIC_NAME|NICK|BLURB. Also define
GIMP_PARAM_READABLE, _WRITABLE and _READWRITE which include
GIMP_PARAM_STATIC_STRINGS.
* app/*/*.c: use them for all object properties so their
strings are not copied.
2005-12-10 Michael Natterer <mitch@gimp.org>
* app/config/*.c
* app/core/*.c
* app/display/*.c
* app/text/*.c
* app/vectors/*.c: port to G_DEFINE_TYPE() and friends. Some related
core reordering and cleanup.
2005-11-01 Sven Neumann <sven@gimp.org>
* app/core/gimpbrushgenerated.c (gimp_brush_generated_load): use
gimp_brush_generated_new() to create the brush object. Removed
redundant calls to gimp_data_dirty().
* app/core/gimpdata.c: freeze the data object during construction.
2005-06-08 Sven Neumann <sven@gimp.org>
Removed "stingy-memory-use" all over the place. This feature was
really not that useful anymore. The GUI for the preference option
was already removed for GIMP 2.2. Fixes bug #306617.
* app/config/gimpbaseconfig.[ch]: set IGNORE flag on
"stingy-memory-use".
* app/config/gimpcoreconfig.h: added a comment that the
font_path_writable variable is unused.
* app/base/temp-buf.[ch]: removed code that used to deal with
swapping temp-bufs to disk.
* app/base/base.c: made base_config a static variable.
* app/core/gimpdata.[ch]
* app/core/gimpdatafactory.[ch]: removed stingy_memory_use
parameter from data construction methods.
* app/core/gimp-gradients.c
* app/core/gimpbrush-load.[ch]
* app/core/gimpbrush.[ch]
* app/core/gimpbrushgenerated.[ch]
* app/core/gimpbrushpipe.[ch]
* app/core/gimpcontext.c
* app/core/gimpgradient-load.[ch]
* app/core/gimpgradient.[ch]
* app/core/gimppalette-import.c
* app/core/gimppalette.[ch]
* app/core/gimppattern.[ch]: changed accordingly.
2005-05-26 Sven Neumann <sven@gimp.org>
* app/core/gimpdata.[ch]: added MIME type as a construct property
to GimpData.
* app/core/gimpbrush-load.c
* app/core/gimpbrushgenerated.c
* app/core/gimpbrushpipe.c
* app/core/gimpgradient-load.c
* app/core/gimppalette.c
* app/core/gimppattern.c: set the MIME type when loading a data
object from file. MIME types needs review and GimpPalette isn't
quite done yet...
* app/core/gimpdashpattern.c: cosmetics.
2004-10-04 Michael Natterer <mitch@gimp.org>
* tools/pdbgen/pdb/brush.pdb
* tools/pdbgen/pdb/gradient.pdb
* tools/pdbgen/pdb/palette.pdb: disallow the empty string for
new brushes, gradients and palettes and check the return value
of gimp_data_factory_data_new(). Cleanup.
* app/core/gimpbrushgenerated.c (gimp_brush_generated_new)
* app/core/gimpgradient.c (gimp_gradient_new)
* app/core/gimpdatafactory.c (gimp_data_factory_data_new): same
here. Fixes bug #154264.
* app/core/gimpdata.[ch] (gimp_data_set_filename): added boolean
"deletable" parameter because it's not derivable from "writable".
* app/core/gimpdatafactory.c (gimp_data_factory_load_data): need
to figure "deletable" separately from "writable" to be able to
delete unsavable stuff in the user-writable data directories.
Fixes bug #154410.
(gimp_data_factory_data_save_single): cleaned up.
* app/pdb/brush_cmds.c
* app/pdb/gradient_cmds.c
* app/pdb/palette_cmds.c
* libgimp/gimpbrush_pdb.c
* libgimp/gimpgradient_pdb.c
* libgimp/gimppalette_pdb.c: regenerated.
2004-08-04 Simon Budig <simon@gimp.org>
* app/core/gimpbrushgenerated.c: Enhanced the range of the hardness
parameter to make more soft brushes possible. Please note that this
makes existing generated brushes look more soft. But since people
apparently rarely use more than one or two generated brushes and
these get changed frequently I guess it should be OK.
2004-08-03 Michael Natterer <mitch@gimp.org>
* app/core/gimpbrushgenerated.c (gimp_brush_generated_load): don't
leak the brush's name if parsing the shape fails.
(gimp_brush_generated_dirty): shut up bogus compiler warnings
about uninitialized variables.
2004-08-02 Simon Budig <simon@gimp.org>
* app/widgets/gimpbrusheditor.c: Fixed brush spacing for brushes
with >= 2 spikes. Spotted by Joao S. O. Bueno.
Fixes bug #149099.
2004-08-01 Simon Budig <simon@gimp.org>
* app/core/core-enums.h
* app/core/gimpbrushgenerated.[ch]: Implement three different
brush shapes for generated brushes.
* app/core/gimpbrush.c: changed accordingly.
* app/core/core-enums.c: regenerated.
* app/widgets/gimpbrusheditor.[ch]: Add toggles for the shape.
* themes/Default/images/stock-brush-generated-*-16.png: New stock
icons for the brush shapes.
* themes/Default/images/Makefile.am
* libgimpwidgets/gimpstock.[ch]: changed accordingly
untabified the files touched.
2004-07-26 Michael Natterer <mitch@gimp.org>
* app/core/gimpdatafactory.h: added "gboolean writable" to the
GimpDataFactoryLoaderEntry struct. Return a GList* instead of
GimpData* from GimpDataLoadFunc so it's possible to load more than
one data object from one file.
* app/core/gimpdatafactory.c (gimp_data_factory_load_data):
changed accordingly: add all items of the returned lists to the
data factory. Make the data object writable only if it's in the
writable path *and* its loader entry says it's a writable format
*and* the returned list contains exactly one element.
* app/core/gimp.c (gimp_real_initialize): declare all loader
entries as writable where we have code to read and write exactly
one object per file; all others are not writable.
* app/core/gimpbrush.[ch]
* app/core/gimpbrushgenerated.[ch]
* app/core/gimpbrushpipe.[ch]
* app/core/gimpgradient-load.[ch]
* app/core/gimppalette.[ch]
* app/core/gimppattern.[ch] (all load functions): return a list
containing the loaded object instead of the object itself.
2004-06-25 Michael Natterer <mitch@gimp.org>
* app/core/gimpbrushgenerated.[ch]: reordered parameters and
members to be consistent with other places where generated
brushes are used. Check for errors when loading a brush and
utf8-validate its name. Cleanup.
* app/core/gimpbrush.c
* app/core/gimpbrushpipe.c: cleanup.
2004-06-25 Michael Natterer <mitch@gimp.org>
* app/core/gimpbrushgenerated.c: added properties for all brush
parameters.
* app/widgets/gimpbrusheditor.c: listen to property changes of the
edited brush and update the scales accordingly.
2004-06-13 Michael Natterer <mitch@gimp.org>
* app/core/gimpdata.[ch]: added "gint freeze_count" and
gimp_data_freeze()/thaw() functions. Emit "dirty" only if
freeze_count either is 0 or drops to 0.
* app/core/gimpbrushgenerated.[ch]
* app/core/gimpgradient.[ch]: removed freeze/thaw stuff that
was duplicated in these two subclasses and use the new
GimpData API instead.
* app/widgets/gimpbrusheditor.c
* app/widgets/gimpgradienteditor.c: changed accordingly.
2004-01-29 Michael Natterer <mitch@gimp.org>
GimpData code review:
* app/core/gimpdata.c (gimp_data_init): default to
writable = FALSE and dirty = TRUE.
* app/core/gimpbrushgenerated.[ch]: added "const gchar *name" to
gimp_brush_generated_new().
* app/core/gimpbrush.c
* app/core/gimpbrushgenerated.c
* app/core/gimpbrushpipe.c
* app/core/gimpgradient.c
* app/core/gimppalette.c
* app/core/gimppattern.c: set all standard datas to clean and
internal, check for g_path_is_absolute() in all load functions,
pass the data's name as construct property to g_object_new()
instead of calling gimp_object_set_name() after creation, fixed
some UTF-8 handling, spacing, indentation, coding style, general
cleanup.
2004-01-28 Michael Natterer <mitch@gimp.org>
Added infrastructure to make sure we don't write to the global
brush, pattern etc. directories. Needed to make this configurable
because we can't rely on the global directories being read-only,
having certain names or being otherwise detectable at runtime in a
sane way. Fixes bug #132214.
* libgimpbase/gimpdatafiles.[ch]: added "const gchar *dirname" to
the GimpDataFileData struct so callbacks don't need to call
g_path_get_dirname() for each file.
* libgimpwidgets/gimpfileentry.c: made it work with non UTF-8
encoded filenames.
* libgimpwidgets/gimppatheditor.[ch]: ditto. Added GUI and API for
setting/getting a second "writable_path". The widget makes sure
that the writable_path is always a subset of the path.
* app/config/gimpconfig-utils.[ch]: added new function
gimp_config_build_writable_path().
* app/config/gimpcoreconfig.[ch]: added separate properties for
the writable brush, pattern, gradient, palette and font paths.
* app/config/gimprc-blurbs.h: added (still empty) blurbs for the
new properties.
* app/core/gimpdata.[ch] (gimp_data_set_filename): added parameter
"gboolean writable". Set data->writable to FALSE by default. If
"writable" is passed as TRUE, still check if we can write to the
file before setting data->writable to TRUE.
(gimp_data_create_filename): changed "data_path" parameter to
"dest_dir" and assume dest_dir is writable.
(gimp_data_duplicate): set data->dirty to TRUE to make sure
duplicated things will be saved.
* app/core/gimpbrush.c
* app/core/gimpbrushgenerated.c
* app/core/gimpbrushpipe.c
* app/core/gimpgradient.c
* app/core/gimppalette.c
* app/core/gimppattern.c: don't set the data's filename and don't
touch data->dirty in the _load() functions because that's done by
the data factory now. Don't touch data->dirty in the _duplicate()
functions because that's done by gimp_data_duplicate() itself now.
* app/core/gimpdatafactory.[ch] (gimp_data_factory_new): added
"writable_property_name" and remember it.
Added utility function gimp_data_factory_get_save_dir() which
determines the directory to save new datas to.
Added public function gimp_data_factory_data_save_single() which
saves a single data object.
Make sure new things get saved to the first writable directory
as specified in preferences.
* app/core/gimp.c (gimp_real_initialize): pass the writable_paths'
property names to gimp_data_factory_new().
* app/widgets/gimpdataeditor.c (gimp_data_editor_save_dirty): use
gimp_data_factory_data_save_single() instead of implementing
saving here.
* app/widgets/gimppropwidgets.[ch] (gimp_prop_path_editor_new):
added "const gchar *writable_property_name" parameter (can be
NULL).
Added the needed callbacks to handle the writable_path and made
the path_editor and file_entry code aware of non UTF-8 filename
encodings. Some general cleanup.
* app/gui/preferences-dialog.c: changed accordingly.
2004-01-19 Sven Neumann <sven@gimp.org>
* app/*/*.c: include "libgimpbase/gimpbase.h" where needed; removed
now unnecessary inclusions of "file/file-utils.h".