2007-03-09 Michael Natterer <mitch@gimp.org>
* app/core/core-types.h: include "libgimpmath/gimpmathtypes.h"
instead of "libgimpmath/gimpmath.h".
* app/core/gimpbrush.h
* app/paint/gimppaintcore.h
* app/paint/gimpperspectiveclone.h
* app/text/gimptext.h
* app/tools/gimptransformtool.h: include gimpvector.h and
gimpmatrix.h explicitely where they are needed in public structs.
* app/*/*.c
* tools/pdbgen/pdb/paths.pdb: include "libgimpmath/gimpmath.h"
where needed.
* app/pdb/paths_cmds.c: regenerated.
svn path=/trunk/; revision=22084
2005-08-20 Michael Natterer <mitch@gimp.org>
* app/base/boundary.[ch]: renamed puclic functions, defines and
enums to live in a proper "boundary" namespace. Cleaned up and
simplified internal code even more.
* app/core/gimpchannel.c
* app/core/gimpdrawable-stroke.c
* app/core/gimplayer-floating-sel.c
* app/paint/gimppaintcore-stroke.c
* app/tools/gimpeditselectiontool.c
* app/tools/gimpfuzzyselecttool.c
* app/tools/gimppainttool.c: changed accordingly.
2005-05-19 Sven Neumann <sven@gimp.org>
* app/core/gimpstrokeoptions.[ch]: renamed property "miter" to
"miter-limit" and added a description to be used as a tooltip in
the stroke editor.
* app/core/gimpdrawable-stroke.c
* app/widgets/gimpstrokeeditor.c: changed accordingly.
2004-10-20 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable-stroke.c
(gimp_drawable_stroke_scan_convert): Replacing the call to
gimp_channel_is_empty() by a simple gimp_drawable_mask_intersect()
was wrong because gimp_channel_is_empty() makes sure that the
selection doesn't mask itself while being stroked.
2004-10-20 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable.[ch]: added gimp_drawable_mask_intersect()
which returns the same bounding box as gimp_drawable_mask_bounds(),
but returns TRUE only if there is a non-empty intersection between
the drawable and the selection, or no selection at all. It also
returns the intersection as x,y,width,height instead of the
eeky x1,y1,x2,y2.
* app/core/gimp-edit.c
* app/core/gimpdrawable-blend.c
* app/core/gimpdrawable-bucket-fill.c
* app/core/gimpdrawable-desaturate.c
* app/core/gimpdrawable-equalize.c
* app/core/gimpdrawable-histogram.c
* app/core/gimpdrawable-invert.c
* app/core/gimpdrawable-stroke.c
* app/core/gimpimagemap.c
* app/core/gimpselection.c
* tools/pdbgen/pdb/color.pdb
* tools/pdbgen/pdb/transform_tools.pdb: either switch from
gimp_drawable_mask_bounds() to _intersect() or check the return
values of _mask_bounds() manually to avoid operations on empty
areas. Return successfully because it's a nop, not a failure.
Fixes bug #155733 for the core.
* app/pdb/color_cmds.c
* app/pdb/transform_tools_cmds.c: regenerated.
2003-12-31 Simon Budig <simon@gimp.org>
* app/core/gimpdrawable-stroke.c
* app/paint/gimppaintcore-stroke.c: Don't simplify the border
of the selection. Quite some people were confused by the
polygonal look of a stroked ellipse. The old behaviour doesn't
look good, but the new one isn't really better. Since the
old behaviour is more predictable, I am reverting this for now
(Please note that the function to simplify the boundary still
is available, it just is unused).
Hopefully at some point it will be possible to have non-integer
boundary coordinates or even a more sophisticated set of
"vector-selection" tools.
2003-12-27 Simon Budig <simon@gimp.org>
Dashed stroking is here... :-)
* app/core/gimpdrawable-stroke.c: actually use the dash pattern
from the options
* app/core/gimpscanconvert.c: Normalize the dash pattern, so
that libart does the right thing.
* app/core/gimpstrokeoptions.c: Fix default value for dash
offset, handle the property_get for PROP_DASH_INFO correct.
* app/widgets/gimpdasheditor.[ch]
* app/widgets/Makefile.am
* app/widgets/widgets-types.h: New widget to edit a dash
pattern.
* app/widgets/gimpstrokeeditor.c: Use it.
2003-12-21 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable-stroke.c (gimp_drawable_stroke_boundary):
fixed cut'n'paste bug: always use offset_x, not offset_y for x
coordinates (spotted by Olivier Gondouin).
2003-11-22 Sven Neumann <sven@gimp.org>
Fixed some selection editor problems (bug #127644):
* plug-ins/sel2path/sel2path.c: use the given image_ID, ignore the
drawable_ID. This plug-in doesn't operate on a drawable at all.
* plug-ins/imagemap/imap_main.c: pass a valid image_ID to sel2path.
* app/gui/vectors-commands.c: don't attempt to create a valid
drawable_ID for the call to sel2path since it isn't used anyway.
* app/core/gimpdrawable-stroke.c (gimp_drawable_stroke_boundary):
just return when being called with an empty boundary.
2003-11-13 Simon Budig <simon@gimp.org>
* app/core/gimpdrawable-stroke.c: removed erraneous offset by
0.5 pixels.
* app/core/gimpstrokeoptions.c: Adjusted default width of libart
strokes so that a rectangular selection gets stroked with sharp
edges.
2003-10-06 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable-stroke.c
(gimp_drawable_stroke_scan_convert): added new local variables to
hold the drawable's offsets instead of abusing x2 and y2. Use
existing APIs instead of re-implementing stuff. Removed an
obsolete call to tile_manager_set_offsets(). Cleanup.
2003-10-06 Michael Natterer <mitch@gimp.org>
* app/core/gimpchannel.c (gimp_channel_new_from_alpha): create
a channel which the size of the layer, not of the image...
* app/core/gimpchannel-select.c (gimp_channel_select_alpha):
...and take the layer's offsets into account.
* app/core/gimpscanconvert.[ch] (gimp_scan_convert_render): added
off_x and off_y parameters and don't use the passed TileManager's
offsets.
* app/core/gimpchannel-select.c
* app/core/gimpdrawable-stroke.c
* app/tools/gimpiscissorstool.c: changed accordingly.
2003-10-06 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable.[ch]: added new virtual functions
GimpDrawable::get_active_components(), apply_region() and
replace_region().
* app/core/Makefile.am
* app/core/gimpdrawable-combine.[ch]: new files containing
apply_region()'s and replace_region()'s default implementation.
They are identical to the ones removed from GimpImage except that
they don't mask the selection with itself (bug #107949).
* app/core/gimpchannel.c
* app/core/gimplayer.c: implement get_active_components().
* app/core/gimpchannel.c: implement apply_region() and
replace_region() and invalidate the channel's boundary
before upchaining (bug #107949).
* app/core/gimpimage.[ch]: removed gimp_image_apply_image(),
gimp_image_replace_image() and gimp_image_get_active_components().
* app/core/gimpimage-undo-push.c (undo_pop_image): invalidate
boundary and bounds if the drawable is a channel (bug #107949).
(undo_pop_mask)
(undo_pop_channel_mod): finish previous commit :)
* app/core/gimp-edit.c
* app/core/gimpdrawable-blend.c
* app/core/gimpdrawable-bucket-fill.c
* app/core/gimpdrawable-stroke.c
* app/core/gimpimagemap.c
* app/core/gimplayer-floating-sel.c
* app/paint/gimppaintcore.c
* app/tools/gimpinktool.c: changed accordingly.
2003-10-01 Simon Budig <simon@gimp.org>
* app/base/boundary.[ch]: Implemented simplify_boundary (),
which tries to reduce the number of coordinates to get
better interpolation for stroking.
The results still need tweaking.
* app/core/gimpdrawable-stroke.c: Use it.
2003-09-30 Michael Natterer <mitch@gimp.org>
* app/core/gimpscanconvert.[ch]: removed "width", "height" and
"antialias" from the GimpScanConvert struct and from
gimp_scan_convert_new(). Removed gimp_scan_convert_to_channel().
Added "gboolean antialias" to gimp_scan_convert_render().
Some general cleanup.
* app/core/gimpdrawable-stroke.c
* app/core/gimpimage-mask-select.c
* app/tools/gimpiscissorstool.c: changed accordingly.
* app/core/gimpdrawable-stroke.c: renamed
gimp_drawable_stroke_scanconvert_stroke() to
gimp_drawable_stroke_scan_convert() and removed the "gboolean
use_mask_bounds" parameter since we can't decide if it's the
selection's boundary which is stroked. Instead use
gimp_channel_is_empty() on the selection which will return FALSE
while the selection is being stroked.
* app/paint/gimppaintcore-stroke.c: cleanup.
(gimp_paint_core_stroke_boundary): don't use "gint i" twice.
(gimp_paint_core_stroke_vectors): no need to manually close a
closed stroke.
2003-09-30 Simon Budig <simon@gimp.org>
* app/vectors/gimpbezierstroke.c:
(gimp_bezier_stroke_interpolate) Accept NULL for ret_closed.
* app/widgets/gimppreviewrenderervectors.c: removed "closed"
variable.
* app/core/gimpdrawable-stroke.[ch]: Factored out the final
rendering of the scanconvert. Implemented
gimp_drawable_stroke_boundary. Unfortunately the results are
not really good, since the boundary calculation code is
too exact for this purpose. I have a rough idea how to fix this.
* app/core/gimpchannel.c: changed accordingly.
2003-09-30 Michael Natterer <mitch@gimp.org>
* app/paint/gimppaintcore-stroke.c: cleanup.
(gimp_paint_core_stroke_boundary): don't push a separate undo
for each part of the boundary.
* app/core/gimpdrawable-stroke.[ch]: added empty stub
gimp_drawable_stroke_boundary(). Changed
gimp_drawable_stroke_vectors() to take the GimpStrokeOptions as
second parameter.
* app/core/gimpchannel.c (gimp_channel_stroke): use it. No need
to push an undo group around gimp_paint_core_stroke_boundary().
* app/vectors/gimpvectors.c: changed accordingly.
* app/widgets/gimpselectioneditor.[ch]: added a GimpStrokeItemFunc
pointer and use it for stroking.
* app/gui/edit-commands.[ch] (edit_stroke_selection): a
GimpStrokeItemFunc which strokes the selection using the
stroke-dialog.
* app/gui/dialogs-constructors.c: use it for the selection editor.
2003-09-30 Simon Budig <simon@gimp.org>
* app/core/gimpscanconvert.[ch]: replaced
gimp_scan_convert_set_resolution with
gimp_scan_convert_set_pixel_ratio where you specify the pixel
ratio (width/height). Also made the stroke-width consistent
with other places in the gimp by using the Y-Resolution as
the base for the calculations.
* app/core/gimpdrawable-stroke.c: changed accordingly.
2003-09-30 Sven Neumann <sven@gimp.org>
* app/core/gimpdrawable-stroke.c
* app/core/gimpstrokeoptions.[ch]
* app/gui/stroke-dialog.c: removed the resolution property again.
The object should stay resolution independent. The resolution can
be taken from the image it is used with.
2003-09-30 Simon Budig <simon@gimp.org>
* app/core/gimpscanconvert.[ch]: Added support for setting
X- and Y-resolution for stroking paths. The width of a path
has to be given in pixels, using X-resolution.
* app/core/gimpstrokeoptions.[ch]: Added "resolution" property,
so that conversion between various width-units can happen.
Should be set to the target images X-resolution.
* app/gui/stroke-dialog.c: set the resolution of the options.
* app/core/gimpdrawable-stroke.c: Use that stuff, cleanup.
2003-09-28 Simon Budig <simon@gimp.org>
"The last of the Oldenburg commits"
Thanks to the team of the Oldenburg Linux Developers Meeting 2003
for providing a nice hacking environment.
* app/vectors/gimpvectors.c: Add a default stock_id.
* app/widgets/gimppreviewrenderervectors.[ch]: New Widget
to render the preview of vectors. Just renders a stock item
now, since I was unable to figure out how to properly draw
in the GtkWidget.
* app/widgets/Makefile.am
* app/widgets/widgets-types.h: Changed accordingly.
* app/widgets/gimppreviewrenderer-utils.c: Use the new widget.
* app/core/gimpscanconvert.c
* app/core/gimpdrawable-stroke.c: Use higher prescision for
libart-stroking vectors. Reduces artefacts.
* app/pdb/paths_cmds.c
* libgimp/gimppaths_pdb.c: Regenerated after Tors changes.
2003-09-27 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable-bucket-fill.c
(gimp_drawable_bucket_fill_full): set the transformed color's
alpha to OPAQUE so it works with color_region().
* app/core/gimpdrawable-stroke.c (gimp_drawable_stroke_vectors):
no need to transform the color into a newly allocated array,
simply use guchar[MAX_CHANNELS] instead.
Cleaned up both functions to use RED_PIX, GREEN_PIX and BLUE_PIX
instead of 0, 1 and 2.
2003-09-27 Michael Natterer <mitch@gimp.org>
* app/paint-funcs/paint-funcs.[ch]: added new functions
color_region_mask() which works like color_region() but takes an
additional maskPR parameters and pattern_region() which fills
destPR with a TempBuf of *matching color depth*.
* app/paint-funcs/paint-funcs-generic.h: added corresponding
color_pixels_mask() and pattern_pixels().
* app/core/gimpimage.[ch] (gimp_image_transform_temp_buf): new
function which transforms a TempBuf to a specified drawable's
color space.
* app/core/gimpdrawable-bucket-fill.c: the functions were factored
out here. Removed them and use the new stuff.
* app/core/core-enums.[ch]: added enum GimpStrokeStyle which can
be one of { SOLID, PATTERN }.
* app/core/gimpstrokeoptions.[ch]: added "GimpStrokeStyle style"
property, cleanup.
* app/core/gimpdrawable-stroke.c: honor the new "style" property
and call the new color_region_mask() and pattern_region()
functions accordingly, cleanup.
* app/widgets/gimpstrokeeditor.c: added a GUI for the stroke
style. Ugly but works.
* app/gui/stroke-dialog.c: undefine "foreground" and "pattern" and
set the user context as parent context so we get these properties
from the global settings.
2003-09-27 Simon Budig <simon@gimp.org>
* app/core/gimpdrawable-stroke.[ch]: changed the API of
gimp_drawable_stroke_vectors to accept GimpStrokeOptions
instead of lots of individual parameters.
* app/vectors/gimpvectors.c: changed accordingly.
2003-09-27 Simon Budig <simon@gimp.org>
This still is very much in progress. I just want to commit this
to avoid lossage. It kind of works but there definitely is
code in the wrong place now.
* app/gui/stroke-dialog.[ch]: New files implementing a dialog
containing Svens GimpStrokeEditor-Widget.
* app/gui/Makefile.am: changed accordingly.
* app/gui/vectors-commands.c: Open the StrokeOptions-Dialog when
the "stroke" menu entry gets selected.
* app/vectors/gimpvectors.c: Remove bad #ifdef hacks and use
Libart/Paintcore-Stroking depending on the type of the stroke_desc
Parameter.
* app/core/gimpstrokeoptions.c: Proper handle the Enum-Properties.
* app/core/gimpscanconvert.[ch]: make the antialias-parameter
to gimp_scan_convert_new a gboolean.
* app/tools/gimpiscissorstool.c
* app/core/gimpdrawable-stroke.c
* app/core/gimpimage-mask-select.c: Changed accordingly.
2003-09-26 Simon Budig <simon@gimp.org>
* app/core/gimpscanconvert.[ch]: Add some parameters to
gimp_scan_convert_stroke () to expose the Miter-Setting
and enable dashing of vectors.
* app/core/gimpdrawable-stroke.c: Use the dashing feature.
* app/vectors/gimpvectors.c: Expose a bad hack (opacity
controls the libart-stroke width) in a #define. Default
is not enabled.
2003-09-23 Simon Budig <simon@gimp.org>
* app/core/gimpdrawable-stroke.c: Fixed vectors stroking on
GRAY* and INDEXED* layers.
* app/tools/gimpvectortool.c: Made the polygonal mode more
consistent.
2003-09-21 Simon Budig <simon@gimp.org>
* app/core/gimpscanconvert.c: Adjusted to make sure that
no successive LINETOs to the same coordinate are in the
path. Libart chokes on that.
* app/core/gimpdrawable-stroke.c: Respect the offsets of the
target drawable.
* app/tools/gimpvectortool.c: Removed status message in
VECTORS_FINISHED mode as requested by Ville Pätsi.
* app/vectors/gimpvectors.c: Determine the stroke parameters
from the current context (opacity/color/paint_mode).
The other parameters are not yet supported.
2003-09-21 Sven Neumann <sven@gimp.org>
* app/core/core-enums.[ch]: renamed new enums to use "style" instead
of the overloaded term "type". Also renamed GimpGridType while I was
on it.
* app/core/gimpdrawable-stroke.[ch]
* app/core/gimpgrid.[ch]
* app/core/gimpscanconvert.[ch]
* app/display/gimpdisplayshell.c
* app/vectors/gimpvectors.c
* app/gui/grid-dialog.c: changed accordingly.
2003-09-21 Simon Budig <simon@gimp.org>
Dave Neary <bolsh@gimp.org>
* app/core/gimpdrawable-stroke.c: gimp_image_apply_image () must
not get the pixel Region twice, use NULL for src1_tiles, which
then defaults to the drawables tiles. Also pixel_region_init()
does not take the offsets set by tile_manager_set_offsets into
account. Use 0,0 instead of x1,y1. Fixes bad crashes.
* app/core/gimpscanconvert.c: fixed crash for the same reason.
* app/vectors/gimpvectors.c: Enabled the new stroking by default.
Of course there should be a dialog to tweak the settings... :-)
2003-09-20 Simon Budig <simon@gimp.org>
Dave Neary <bolsh@gimp.org>
First steps towards Libart stroking. Right now the code
crashes and thus is disabled by default. If you want to
test it, change the #define LIBART_STROKE in
app/vectors/gimpvectors.c. Then a click on the stroke button
in the paths dialog invokes the new code.
The crash is in gimpdrawable-stroke.c - apparently I did not
yet get the TileManager stuff correctly.
* app/core/gimpscanconvert.[ch]: Rewritten to be more clear
and have an easier API. Now can handle open Paths and
libart-stroke the (open/closed) polygons defined earlier.
* app/core/core-enums.h: Added Enums for LineJoin-Type and
EndCap-Type for stroking.
* app/core/core-enums.c: regenerated.
* app/core/gimpimage-mask-select.c: Use the new API of
GimpScanConvert where appropriate.
* app/vectors/gimpvectors.c: Added #define to enable the libart
stroking. Disabled by default because of the crash mentioned
above...
* app/vectors/gimpbezierstroke.c
* app/vectors/gimpstroke.c
* app/vectors/gimpvectors.[ch]: Removed Libart stuff here.
Libart usage now lives exclusively in GimpScanConvert.
* app/core/gimpdrawable-stroke.[ch]: New files for the libart
stroking (right now just vector objects).
* app/core/Makefile.am: changed accordingly.
* app/Makefile.am: Needed to tweak linking. :-/