Commit Graph

11242 Commits

Author SHA1 Message Date
Michael Natterer 740ab5e633 renamed gimp_item_width() to gimp_item_get_width() and gimp_item_height()
2008-11-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem.[ch]: renamed
	gimp_item_width() to gimp_item_get_width() and
	gimp_item_height() to gimp_item_get_height().

	* app/actions/channels-commands.c
	* app/actions/drawable-commands.c
	* app/actions/layers-commands.c
	* app/core/<many>.c
	* app/dialogs/offset-dialog.c
	* app/dialogs/resize-dialog.c
	* app/dialogs/scale-dialog.c
	* app/display/gimpdisplayshell-dnd.c
	* app/display/gimpdisplayshell.c
	* app/paint/gimpbrushcore.c
	* app/paint/gimpdodgeburn.c
	* app/paint/gimpink.c
	* app/paint/gimppaintcore.c
	* app/paint/gimpsmudge.c
	* app/text/gimptextlayer-xcf.c
	* app/text/gimptextlayer.c
	* app/tools/gimpaligntool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimpimagemaptool.c
	* app/tools/gimprectangletool.c
	* app/tools/gimpregionselecttool.c
	* app/tools/gimptexttool.c
	* app/vectors/gimpvectors.c
	* app/vectors/gimpvectorsmodundo.c
	* app/widgets/gimptoolbox-dnd.c
	* app/widgets/gimpviewrendererdrawable.c
	* app/widgets/gimpviewrenderervectors.c
	* app/xcf/xcf-load.c
	* app/xcf/xcf-save.c
	* tools/pdbgen/pdb/drawable.pdb: changed accordingly.

	* app/pdb/drawable-cmds.c: regenerated.


svn path=/trunk/; revision=27531
2008-11-03 00:09:01 +00:00
Martin Nordholts c3b7be242c Instantiate offset_node on-demand.
* app/core/gimpitem.c: Instantiate offset_node on-demand.

* app/core/gimpdrawable.c: Use gimp_item_set_offset().

svn path=/trunk/; revision=27530
2008-11-02 23:16:47 +00:00
Michael Natterer 5b68a1d0eb renamed gimp_item_offsets() to gimp_item_get_offset() and
2008-11-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem.[ch]: renamed
	gimp_item_offsets() to gimp_item_get_offset() and
	gimp_item_set_offsets() to gimp_item_set_offset().

	* app/actions/drawable-commands.c
	* app/actions/layers-commands.c
	* app/core/<many>.c
	* app/display/gimpdisplayshell-dnd.c
	* app/display/gimpdisplayshell-preview.c
	* app/display/gimpdisplayshell-transform.c
	* app/display/gimpdisplayshell.c
	* app/paint/gimppaintcore-stroke.c
	* app/paint/gimppaintcore.c
	* app/paint/gimpsourcecore.c
	* app/text/gimptextlayer-xcf.c
	* app/tools/<many>.c
	* app/widgets/gimptoolbox-dnd.c
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/drawable_transform.pdb
	* tools/pdbgen/pdb/selection.pdb
	* tools/pdbgen/pdb/transform_tools.pdb
	* tools/pdbgen/pdb/vectors.pdb: changed accordingly.

	* app/pdb/drawable-cmds.c
	* app/pdb/drawable-transform-cmds.c
	* app/pdb/selection-cmds.c
	* app/pdb/vectors-cmds.c
	* app/pdb/transform-tools-cmds.c: regenerated.


svn path=/trunk/; revision=27529
2008-11-02 23:03:29 +00:00
Martin Nordholts 594bc84ace New function that sets the offset of the item and also keeps the
* app/core/gimpitem.c (gimp_item_set_offsets): New function that
sets the offset of the item and also keeps the offset_node in
sync.

* app/core/gimpdrawable.c (gimp_drawable_real_set_tiles): Use the
function instead of setting the offsets directly. Fixes corrupted
display when cropping images with GEGL enabled for the projection.

svn path=/trunk/; revision=27528
2008-11-02 22:44:33 +00:00
Martin Nordholts 93577a2eec Moved the shift_node from GimpLayer to GimpItem, and call it offset_node.
* app/core/gimpitem.[ch]: Moved the shift_node from GimpLayer to
GimpItem, and call it offset_node. Also added
gimp_item_get_offset_node() meant to be used in the same way as
gimp_item_offsets().

(gimp_item_real_translate): Keep the offset_node up to date.

* app/core/gimplayer.[ch]: Don't manage the offset_node, get it
from GimpItem instead.

svn path=/trunk/; revision=27527
2008-11-02 22:29:05 +00:00
Michael Natterer a748e3f58e add new functions gimp_get_image_iter(), display_iter() and
2008-11-02  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp.[ch]: add new functions gimp_get_image_iter(),
	display_iter() and tool_info_iter().

	* app/tools/gimp-tools.c
	* app/tools/gimptexttool.c
	* app/tools/gimpvectortool.c
	* app/dialogs/quit-dialog.c
	* app/gui/gui.c
	* app/menus/windows-menu.c
	* app/actions/images-commands.c
	* app/actions/tools-actions.c
	* app/actions/windows-actions.c
	* app/actions/tool-options-commands.c
	* app/display/gimpdisplay.c
	* app/display/gimpdisplay-foreach.c
	* app/widgets/gimptoolbox.c
	* tools/pdbgen/pdb/image.pdb: use them here.

	* app/pdb/image-cmds.c: regenerated.


svn path=/trunk/; revision=27526
2008-11-02 21:34:14 +00:00
Michael Natterer d1ca165b4e add new functions gimp_image_get_layer_iter(), channel_iter() and
2008-11-02  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.[ch]: add new functions
	gimp_image_get_layer_iter(), channel_iter() and vectors_iter()
	which return the GList inside the resp. GimpList.

	* app/actions/channels-actions.c
	* app/actions/layers-actions.c
	* app/actions/vectors-actions.c
	* app/core/gimpimage-convert.c
	* app/core/gimpimage-crop.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-flip.c
	* app/core/gimpimage-item-list.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-resize.c
	* app/core/gimpimage-rotate.c
	* app/core/gimpimage-scale.c
	* app/core/gimpimage.c
	* app/core/gimpimage.h
	* app/core/gimpprojection-construct.c
	* app/display/gimpdisplayshell-draw.c
	* app/file/file-open.c
	* app/tools/gimpaligntool.c
	* app/tools/gimpdrawtool.c
	* app/vectors/gimpvectors-compat.c
	* app/vectors/gimpvectors-export.c
	* app/widgets/gimplayertreeview.c
	* app/xcf/xcf-save.c
	* tools/pdbgen/pdb/image.pdb: use the new functions instead of
	peeking both into the image and the list. Remove inclusions of
	"gimplist.h" or change them into "gimpcontainer.h" if needed.

	* app/pdb/image-cmds.c: regenerated.


svn path=/trunk/; revision=27524
2008-11-02 20:46:57 +00:00
Michael Natterer c14c84ba63 add "update" signal with the same signature as GimpImage::update().
2008-11-02  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawablestack.[ch]: add "update" signal with the
	same signature as GimpImage::update(). Install handlers for the
	drawables' "update" and "visibility-changed" signals and emit
	"update" accordingly, item offsets taken into account. Also emit
	"update" when drawables are added, removed and reordered.

	* app/core/gimpimage.[ch]: remove handlers and tons of code that
	makes sure the image emits "update" on any of the above handled
	events and simply connect the layer and channel stacks' "update"
	signal to gimp_image_update().


svn path=/trunk/; revision=27523
2008-11-02 19:53:51 +00:00
Michael Natterer 50ac74be1e remove the mask_node and simply set both opacity and the layer mask's
2008-11-02  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplayer.[ch]: remove the mask_node and simply set
	both opacity and the layer mask's source node on the opacity_node.
	Needs latest SVN GEGL.


svn path=/trunk/; revision=27522
2008-11-02 18:39:10 +00:00
Martin Nordholts 24fac1de0f Move the base GeglNode here in preparation for moving the GimpLayer
* app/core/gimpitem.[ch]: Move the base GeglNode here in
preparation for moving the GimpLayer gegl:shift op to here as
well. After all, the offsets are properties of GimpItem and not
GimpLayer.

* app/core/gimpdrawable.[ch]: Delegate appropriate stuff to the
GimpItem base class, like part of the visibility toggling and the
creation and destruction of the GimpItem node.

* app/core/gimplayer.c
* app/core/gimpchannel.c
* app/core/gimpdrawablestack.c: Changed accordingly, use the new
function names.

* app/core/gimpitempropundo.c
* app/vectors/gimpvectors-warp.c
* app/vectors/gimpvectorsmodundo.c: Include gegl.h instead of
glib-object.h

svn path=/trunk/; revision=27521
2008-11-02 16:39:38 +00:00
Michael Natterer 5fdbd3f58e set the MOVE cursor when we are in MOVING mode.
2008-11-01  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimprectangletool.c
	(gimp_rectangle_tool_cursor_update): set the MOVE cursor when we
	are in MOVING mode.

	* app/tools/gimptexttool.[ch]: remove members x1,x2,y1,y2 and use
	the rectangle tool's bounding box for creating the text layer (x2
	and y2) were unused anyway. Add boolean member "moving". Implement
	oper_update() and set the tool to moving mode when ALT is pressed.
	Changed button_press(), button_release() and motion() accordingly.
	Some more cleanup and removal of comented out code.


svn path=/trunk/; revision=27519
2008-11-01 19:05:56 +00:00
Michael Natterer f7287be7b5 app/tools/gimptool.[ch] made all GimpCoords* in the tool API const.
2008-11-01  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptool.[ch]
	* app/tools/tool_manager.[ch]: made all GimpCoords* in the tool
	API const.

	* app/tools/gimpaligntool.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpbrushtool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpcolortool.c
	* app/tools/gimpconvolvetool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpdodgeburntool.c
	* app/tools/gimpeditselectiontool.[ch]
	* app/tools/gimperasertool.c
	* app/tools/gimpfliptool.c
	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimpmagnifytool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimppainttool.c
	* app/tools/gimpperspectiveclonetool.c
	* app/tools/gimprectangleselecttool.c
	* app/tools/gimprectangletool.[ch]
	* app/tools/gimpregionselecttool.c
	* app/tools/gimpselectiontool.[ch]
	* app/tools/gimpsourcetool.c
	* app/tools/gimptexttool.c
	* app/tools/gimptransformtool.c
	* app/tools/gimpvectortool.c: changed accordingly and added const
	to all GimpCoords* in utility functions too.

	* app/tools/gimptexttool.c: don't modify the passed coords. In
	fact, simply removed the code that did because it had no effect.


svn path=/trunk/; revision=27517
2008-11-01 15:17:36 +00:00
Martin Nordholts ca618e3f0b Replaced the XXX for Soft light with a FIXME.
* app/gegl/gimpoperationpointlayermode.c
(gimp_operation_point_layer_mode_process): Replaced the XXX for
Soft light with a FIXME.

svn path=/trunk/; revision=27514
2008-11-01 12:23:14 +00:00
Martin Nordholts a9e187586b Prefix the GIMP GEGL operations with "gimp:" instead of "gimp-" so we
* app/gegl/gimpoperation*.c: Prefix the GIMP GEGL operations with
"gimp:" instead of "gimp-" so we follow the GEGL prefix style and
better serialize to XML.

* app/tools/gimp*tool.c

* app/core/gimpdrawable-*.c
* app/core/gimpdrawable.c
* app/core/gimpimagemap.c
* app/core/gimpprojection.c: Changed accordingly.

svn path=/trunk/; revision=27512
2008-11-01 12:08:35 +00:00
Martin Nordholts 657946b2a7 Introduced helper macros fooC to properly un-multiply pre-multiplied data
* app/gegl/gimpoperationpointlayermode.c: Introduced helper macros
fooC to properly un-multiply pre-multiplied data without causing
NaNs. This fixes some compositing issues involving complete
transparency.

svn path=/trunk/; revision=27511
2008-11-01 09:52:58 +00:00
Martin Nordholts 891156945a Renamed fooC aliases to fooCa since they represent pre-multiplied color
* app/gegl/gimpoperationpointlayermode.c: Renamed fooC aliases to
fooCa since they represent pre-multiplied color data.

svn path=/trunk/; revision=27510
2008-11-01 09:43:27 +00:00
Martin Nordholts 0166d505c1 Get rid of GRand in process() and use a lut instead. A little benchmark
* app/gegl/gimpoperationpointlayermode.c: Get rid of GRand in
process() and use a lut instead. A little benchmark showed a
performance improvement of 78%. Also added defines for the the
size of the area of which Dissolve repeats it dissolve pattern.

svn path=/trunk/; revision=27509
2008-11-01 07:36:03 +00:00
Martin Nordholts 5d7bf3ca4b Implemented Erase, Anti Erase, Color Erase and Replace. These are not
* app/gegl/gimpoperationpointlayermode.c
(gimp_operation_point_layer_mode_process): Implemented Erase, Anti
Erase, Color Erase and Replace. These are not normal layer modes
and handle alpha in their own way. In addition to this, the
behavior of Replace doesn't map very well to GEGL which uses
infinite sized "layers".

Completely works the same:
 o Erase
 o Anti Erase
 o Color Erase

Works different but similar:
 o Replace

* app/paint-funcs/paint-funcs.[ch]: Expose
paint_funcs_color_erase_helper() so it can be used in the
GimpOperationPointLayerMode implementation. Once the migration is
complete this function can be moved entirely to the op and be
tailored to work on premultiplied data.

svn path=/trunk/; revision=27502
2008-10-31 21:02:26 +00:00
Sven Neumann 2fe030bd19 Bug 558660 – help behavior for locales without manual translation
2008-10-31  Sven Neumann  <sven@gimp.org>

	Bug 558660 – help behavior for locales without manual 
translation
	
	* app/widgets/gimphelp.c (gimp_help_user_manual_is_installed):
	as a fallback check for the english user manual.


svn path=/trunk/; revision=27500
2008-10-31 20:00:19 +00:00
Michael Natterer 5400234712 bail out when the passed display is != tool->display. Makes the keyboard
2008-10-31  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptexttool.c (gimp_text_tool_key_press): bail out
	when the passed display is != tool->display. Makes the keyboard
	work in other displays while the text tools is active.


svn path=/trunk/; revision=27498
2008-10-31 16:49:59 +00:00
Michael Natterer f971d31ff1 add gimp_draw_tool_draw_text_cursor() which draws a properly transformed
2008-10-31  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpdrawtool.[ch]: add gimp_draw_tool_draw_text_cursor()
	which draws a properly transformed cursor that always has the same
	line width.

	* app/tools/gimptexttool.c (gimp_text_tool_draw): use it instead
	of drawing a cursor here that is broken at anything but 1:1 zoom.


svn path=/trunk/; revision=27497
2008-10-31 16:48:29 +00:00
Michael Natterer 9e7edcbe41 app/actions/text-tool-actions.c add missing includes and remove unused
2008-10-31  Michael Natterer  <mitch@gimp.org>

	* app/actions/text-tool-actions.c
	* app/actions/text-tool-commands.c: add missing includes and
	remove unused variable.


svn path=/trunk/; revision=27496
2008-10-31 13:18:55 +00:00
Sven Neumann 3c15e5ed19 removed checks for PangoFT2.
2008-10-31  Sven Neumann  <sven@gimp.org>

	* INSTALL: 
	* configure.in: removed checks for PangoFT2.

	* app/config/Makefile.am
	* app/text/Makefile.am
	* app/Makefile.am: removed use of PANGOFT2_CFLAGS and 
PANGOFT2_LIBS.


svn path=/trunk/; revision=27490
2008-10-31 07:53:40 +00:00
Sven Neumann 437c046da4 app/text/gimpfont.c render font previews using PangoCairo.
2008-10-31  Sven Neumann  <sven@gimp.org>

	* app/text/gimpfont.c
	* app/text/gimpfontlist.c: render font previews using 
PangoCairo.


svn path=/trunk/; revision=27489
2008-10-31 07:24:11 +00:00
Sven Neumann 94dd20dadc bumped minimum required version of Cairo to 1.6.4.
2008-10-31  Sven Neumann  <sven@gimp.org>

	* configure.in: bumped minimum required version of Cairo to 
1.6.4.

	* app/core/gimpscanconvert.c: use 
cairo_format_stride_for_width().


svn path=/trunk/; revision=27488
2008-10-31 07:20:07 +00:00
Martin Nordholts b5733dd32e Formating, simplification and fixed operator precedence for the seed (not
* app/gegl/gimpoperationpointlayermode.c
(gimp_operation_point_layer_mode_process): Formating,
simplification and fixed operator precedence for the seed (not
that it matters much).

svn path=/trunk/; revision=27487
2008-10-31 07:04:31 +00:00
Martin Nordholts fc7e65e783 Formating and simplification.
* app/gegl/gimpoperationpointlayermode.c
(gimp_operation_point_layer_mode_process): Formating and
simplification.

svn path=/trunk/; revision=27486
2008-10-30 23:37:45 +00:00
Martin Nordholts 12ea533fc3 The GEGL API actually allows us to handle the Dissolve layer mode as a
* app/gegl/gimpoperationpointlayermode.c
(gimp_operation_point_layer_mode_process): The GEGL API actually
allows us to handle the Dissolve layer mode as a point op. The
GEGL implementation of Dissolve uses a faster implementation for
deterministic behavior than the legacy Dissolve implementation.
The end result should be identical (although not on the
pixel-level).

Completely works the same:
 o Dissolve

svn path=/trunk/; revision=27485
2008-10-30 23:18:35 +00:00
Michael Natterer 106b09f5ae bail out instead of crashing if the tool has no display.
2008-10-31  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptexttool.c (gimp_text_tool_key_press): bail out
	instead of crashing if the tool has no display.

	(gimp_text_tool_draw)
	(gimp_text_tool_draw_preedit)
	(gimp_text_tool_draw_selection)
	(gimp_text_tool_xy_to_offset): need to adjust all drawing and
	event coordinates by a possible negative offset between logical
	rectangle and ink rectangle (if the ink rectangle is larger than
	the logical one).

	* app/display/gimpdisplayshell-callbacks.c
	(gimp_display_shell_canvas_tool_events): continue normally if
	tool_manager_key_press_active() returns FALSE.


svn path=/trunk/; revision=27484
2008-10-30 23:13:24 +00:00
Sven Neumann dfd721ef5b app/text/gimp-fonts.c removed unused includes.
2008-10-30  Sven Neumann  <sven@gimp.org>

	* app/text/gimp-fonts.c
	* app/text/gimpfont-utils.c: removed unused includes.


svn path=/trunk/; revision=27483
2008-10-30 22:27:57 +00:00
Michael Natterer 7ee008bc48 remove lots of unused variables, apparently my builds were without proper
2008-10-30  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptexttool.c: remove lots of unused variables,
	apparently my builds were without proper warnings for some time.
	Some formatting cleanup and code reordering.

	* app/actions/text-tool-actions.c
	* menus/text-tool-menu.xml: rename "text-tool-input-methods"
	to "text-tool-input-methods-menu".


svn path=/trunk/; revision=27482
2008-10-30 22:18:16 +00:00
Sven Neumann c214f41285 fixed order of includes.
2008-10-30  Sven Neumann  <sven@gimp.org>

	* app/text/gimptextlayout.c: fixed order of includes.

	* app/text/gimptext-compat.c: ported to PangoCairo like the rest
	of the text rendering code.


svn path=/trunk/; revision=27481
2008-10-30 22:17:52 +00:00
Sven Neumann d3cc6a2cf6 removed an obsolete and misleading comment.
2008-10-30  Sven Neumann  <sven@gimp.org>

	* app/text/gimptextlayout-render.c: removed an obsolete and
	misleading comment.


svn path=/trunk/; revision=27480
2008-10-30 22:07:25 +00:00
Martin Nordholts 31e64dace0 Bug 558215 – unit and zoom entries in Statusbar not visible
* app/display/gimpdisplayshell-callbacks.c
(gimp_display_shell_canvas_size_allocate): Don't try to be clever,
call gimp_display_shell_scaled() whenever the canvas size changes
so a newly created display shell gets updated properly.

svn path=/trunk/; revision=27469
2008-10-29 22:28:48 +00:00
Sven Neumann b1ff252ca9 Bug 558451 – Cannot build GIMP using Sun CC on Solaris 2.8
2008-10-29  Sven Neumann  <sven@gimp.org>

	Bug 558451 – Cannot build GIMP using Sun CC on Solaris 2.8

	* app/pdb/gimp-pdb-compat.c
	* app/gegl/gimpoperationtilesink.c
	* app/gegl/gimpoperationtilesource.c
	* app/tools/gimpgegltool.c: applied patches from Eric Lamarque
	fixing the build using Sun CC on Solaris.


svn path=/trunk/; revision=27467
2008-10-29 22:24:08 +00:00
Martin Nordholts 5aa338c668 Implemented the layer modes Hue, Saturation, Color and Value.
* app/gegl/gimpoperationpointlayermode.c
(gimp_operation_point_layer_mode_process): Implemented the layer
modes Hue, Saturation, Color and Value.

Works the same for 100% opaque layers:
 o Hue
 o Saturation
 o Color
 o Value

* libgimpcolor/gimphsl.[ch]: Added gimp_hsl_set().

svn path=/trunk/; revision=27466
2008-10-29 21:25:35 +00:00
Michael Natterer 82ca223376 change member "gboolean stroking" into "gint stroking_count". Add push/pop
2008-10-29  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpselection.[ch]: change member "gboolean stroking"
	into "gint stroking_count". Add push/pop API to increase/decrease
	the counter. Pretend the selection is empty if the counter is > 0.
	Enables correctly rendering vector layers even if there is a
	selection.


svn path=/trunk/; revision=27464
2008-10-29 19:55:58 +00:00
Sven Neumann 064f2afd85 Bug 557950 – Scaling in Gimp 2.6 is much slower than in Gimp 2.4
2008-10-29  Sven Neumann  <sven@gimp.org>

	Bug 557950 – Scaling in Gimp 2.6 is much slower than in Gimp 2.4

	* app/paint-funcs/scale-region.c: don't do multi-pass scaling 
when
	we are scaling up.


svn path=/trunk/; revision=27462
2008-10-29 19:37:52 +00:00
Sven Neumann 755621571c Bug 558420 – projection incorrect with alpha-less layers
2008-10-29  Sven Neumann  <sven@gimp.org>

	Bug 558420 – projection incorrect with alpha-less layers

	* app/core/gimpprojection-construct.c 
(gimp_projection_initialize):
	need to initialize the projection if the covering layer is not
	opaque.


svn path=/trunk/; revision=27460
2008-10-29 19:17:30 +00:00
Michael Natterer e616b56880 move the "Antialias" toggle from here...
2008-10-29  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpstrokeeditor.c: move the "Antialias" toggle from
	here...

	* app/widgets/gimpfilleditor.c: ...to here because it makes sense
	for both filling and stroking.


svn path=/trunk/; revision=27458
2008-10-29 13:30:47 +00:00
Michael Natterer 5530ef6376 turn nested if()s into a switch(release_type).
2008-10-28  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpmagnifytool.c (gimp_magnify_tool_button_release):
	turn nested if()s into a switch(release_type).


svn path=/trunk/; revision=27455
2008-10-28 18:32:40 +00:00
Martin Nordholts cf660f3e94 Bug 556603 – Zoom region always zooms in center of image
* app/tools/gimpmagnifytool.c (gimp_magnify_tool_button_release):
When zooming with a click, use gimp_display_shell_scale() instead
of local zoom logic.

svn path=/trunk/; revision=27452
2008-10-28 18:12:20 +00:00
Michael Natterer 88db29948b added "gboolean below" to gimp_enum_radio_frame_add() and
2008-10-28  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpwidgets-utils.[ch]: added "gboolean below" to
	gimp_enum_radio_frame_add() and gimp_enum_radio_box_add() and
	place the widget right of the radio button unless "below" is TRUE.

	* app/dialogs/convert-dialog.c
	* app/dialogs/layer-add-mask-dialog.c
	* app/tools/gimpbucketfilloptions.c
	* app/tools/gimpclonetool.c
	* app/tools/gimpperspectiveclonetool.c
	* app/widgets/gimpfilleditor.c: pass TRUE so everything stays as-is.


svn path=/trunk/; revision=27450
2008-10-28 17:40:32 +00:00
Martin Nordholts 9631635fcc Put the existing blend formulas in expanded switch cases again. We need to
* app/gegl/gimpoperationpointlayermode.c
(gimp_operation_point_layer_mode_process): Put the existing blend
formulas in expanded switch cases again. We need to keep the more
complicated layer modes like Hue, Value and Saturation in expanded
switch cases anyway.

svn path=/trunk/; revision=27449
2008-10-28 07:30:25 +00:00
Michael Natterer 73410cef60 some minor cleanups.
2008-10-27  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptexttool.c: some minor cleanups.

	(gimp_text_tool_draw): draw a cursor of two pixels width which is
	between glyphs so it is visible both at the left and the right
	border or the rectangle. Also make it look a little more
	cursor-like.


svn path=/trunk/; revision=27446
2008-10-27 21:22:50 +00:00
Michael Natterer bf97eab43e app/actions/text-tool-actions.c app/actions/text-tool-commands.[ch] rename
2008-10-27  Michael Natterer  <mitch@gimp.org>

	* app/actions/text-tool-actions.c
	* app/actions/text-tool-commands.[ch]
	* menus/text-tool-menu.xml: rename action "path-from-text" to
	"text-to-path".


svn path=/trunk/; revision=27445
2008-10-27 20:40:07 +00:00
Michael Natterer c0cb7c1409 menus/text-tool-menu.xml app/actions/text-tool-actions.c add "Text along
2008-10-27  Michael Natterer  <mitch@gimp.org>

	* menus/text-tool-menu.xml
	* app/actions/text-tool-actions.c
	* app/actions/text-tool-commands.[ch]: add "Text along Path" to the
	text tool context menu.

	* app/tools/gimptextoptions.[ch]: remove the text along path
	button here.

	* app/tools/gimptexttool.c: changed accordingly.

	* app/tools/gimptexttool.[ch]: move public functions together,
	move all virtual function implementations together and put them in
	order, made the text along path function public, factor out
	gimp_text_tool_xy_to_offset() instead of duplicaing this code
	three times, remove gimp_rectangle_tool_frame_item() because it
	doesn't belong here.

	* app/tools/gimprectangletool.[ch]: add
	gimp_rectangle_tool_frame_item() here. Enselic, please process ;)


svn path=/trunk/; revision=27444
2008-10-27 16:21:03 +00:00
Sven Neumann ae42ff5fb7 changed menu labels.
2008-10-27  Sven Neumann  <sven@gimp.org>

	* app/actions/text-tool-actions.c: changed menu labels.


svn path=/trunk/; revision=27443
2008-10-27 16:11:50 +00:00
Sven Neumann 855bc3af5b hide the file dialog instead of destroying it.
2008-10-27  Sven Neumann  <sven@gimp.org>

	* app/actions/text-editor-commands.c 
(text_editor_load_response):
	hide the file dialog instead of destroying it.


svn path=/trunk/; revision=27442
2008-10-27 12:27:09 +00:00
Sven Neumann 4ce3a62572 removed unused includes.
2008-10-27  Sven Neumann  <sven@gimp.org>

	* app/tools/gimptexttool.c: removed unused includes.

	* app/actions/text-tool-commands.c 
(text_tool_load_cmd_callback):
	fixed file dialog for opening text files.


svn path=/trunk/; revision=27441
2008-10-27 12:23:40 +00:00
Michael Natterer b258af7af8 take the layout line's x coordinate into account so the stuff works for
2008-10-27  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptexttool.c (gimp_text_tool_key_press): take the
	layout line's x coordinate into account so the stuff works for
	right-aligned or centered text.


svn path=/trunk/; revision=27440
2008-10-27 11:49:19 +00:00
Michael Natterer 50f043c3a2 argh, need to speak in byte offsets not character offsets. Do so and avoid
2008-10-27  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptexttool.c (gimp_text_tool_key_press): argh, need
	to speak in byte offsets not character offsets. Do so and avoid
	getting the buffer's text on each keystroke just to do the
	char/byte conversion. Will use the same method for all the other
	places which do similar things.

	(gimp_text_tool_connect): minor cleanup.


svn path=/trunk/; revision=27439
2008-10-27 11:00:15 +00:00
Sven Neumann edf9690e00 iterate over the tiles instead of rendering row-by-row.
2008-10-27  Sven Neumann  <sven@gimp.org>

	* app/text/gimptextlayer.c (gimp_text_layer_render_layout):
	iterate over the tiles instead of rendering row-by-row.


svn path=/trunk/; revision=27438
2008-10-27 08:34:07 +00:00
Sven Neumann a725329cda no need to define PANGO_ENABLE_ENGINE
svn path=/trunk/; revision=27437
2008-10-27 08:21:29 +00:00
Sven Neumann 63f6dcb111 use the Y resolution when creating the fontmap.
2008-10-27  Sven Neumann  <sven@gimp.org>

	* app/text/gimptextlayout.c (gimp_text_get_pango_context): use 
the
	Y resolution when creating the fontmap.


svn path=/trunk/; revision=27436
2008-10-27 08:20:02 +00:00
Sven Neumann 71c94ca541 removed unused defines
svn path=/trunk/; revision=27435
2008-10-27 08:16:46 +00:00
Sven Neumann 819c5a6670 minor cleanup.
2008-10-27  Sven Neumann  <sven@gimp.org>

	* app/text/gimptextlayout-render.c 
(gimp_text_layout_render_trafo):
	minor cleanup.


svn path=/trunk/; revision=27434
2008-10-27 08:15:06 +00:00
Sven Neumann edec220dac cleanup, removed unused includes.
2008-10-27  Sven Neumann  <sven@gimp.org>

	* app/text/gimptext-bitmap.c: cleanup, removed unused includes.


svn path=/trunk/; revision=27433
2008-10-27 08:11:41 +00:00
Sven Neumann 033fcf1628 added new enum GimpTextHintStyle.
2008-10-27  Sven Neumann  <sven@gimp.org>

	* libgimpbase/gimpbaseenums.[ch]: added new enum 
GimpTextHintStyle.

	* libgimp/gimpenums.c.tail
	* tools/pdbgen/enums.pl: regenerated.

	* app/text/gimptext.[ch]: added new property "hint-style". 
Removed
	"autohint" property and mapped the boolean property "hinting" to
	the new enum property "hint-style".

	* app/text/gimptextlayout-render.c 
(gimp_text_layout_render_flags):
	use "hint-style".

	* app/tools/gimptextoptions.[ch]: changed tool options 
accordingly.

	* tools/pdbgen/pdb/text_layer.pdb: deprecated the "hinting" API
	and introduced getters and setters for "hint-style".

	* app/pdb/text-layer-cmds.c
	* app/pdb/internal-procs.c
	* libgimp/gimptextlayer_pdb.[ch]: regenerated.


svn path=/trunk/; revision=27432
2008-10-27 07:59:32 +00:00
Michael Natterer cd0885518b add gimp_draw_tool_set_clip_rect() which transforms the passed in
2008-10-27  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpdrawtool.[ch]: add gimp_draw_tool_set_clip_rect()
	which transforms the passed in GdkRectangle before setting it
	on the canvas.

	* app/tools/gimptexttool.c (gimp_text_tool_draw): use it instead
	of gimp_canvas_set_clip_rect().


svn path=/trunk/; revision=27431
2008-10-27 00:10:13 +00:00
Michael Natterer e16b92298d add integer x_pos member to remember the x cursor position when moving up
2008-10-27  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptexttool.h: add integer x_pos member to remember
	the x cursor position when moving up and down across shorter
	lines.

	* app/tools/gimptexttool.c (gimp_text_tool_key_press): implement
	moving the cursor up and down. The x_pos probably needs to be
	reset in a few more places but it seems to work pretty nicely
	already.


svn path=/trunk/; revision=27430
2008-10-26 23:30:23 +00:00
Michael Natterer cabd52129e handle Tab, some more cleanup.
2008-10-26  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptexttool.c: handle Tab, some more cleanup.


svn path=/trunk/; revision=27429
2008-10-26 21:50:20 +00:00
Sven Neumann 2224986130 comments
svn path=/trunk/; revision=27428
2008-10-26 21:42:21 +00:00
Sven Neumann 81e7609827 formatting.
2008-10-26  Sven Neumann  <sven@gimp.org>

	* app/text/gimptextlayout-render.c 
(gimp_text_layout_render_flags):
	formatting.


svn path=/trunk/; revision=27427
2008-10-26 21:23:01 +00:00
Michael Natterer 63b67cc716 more cleanup, mostly formatting.
2008-10-26  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptexttool.c: more cleanup, mostly formatting.


svn path=/trunk/; revision=27426
2008-10-26 20:46:50 +00:00
Martin Nordholts c13cfffad7 Clamp Grain Extract, Grain Merge and Divide.
* app/gegl/gimpoperationpointlayermode.c: Clamp Grain Extract,
Grain Merge and Divide.

svn path=/trunk/; revision=27425
2008-10-26 20:36:25 +00:00
Michael Natterer ef66f5423f some formatting cleanup.
2008-10-26  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptexttool.c: some formatting cleanup.

	* app/tools/gimprectangletool.c: add one space.

	* app/actions/text-tool-actions.c: look at GDK_SELECTION_CLIPBOARD,
	not PRIMARY, to set the sensitivity of "Paste".


svn path=/trunk/; revision=27424
2008-10-26 20:05:11 +00:00
Michael Natterer 3a51f9b75f some general formatting cleanup.
2008-10-26  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptexttool.[ch]: some general formatting cleanup.

	(gimp_text_tool_key_press): implement ctrl-moving the cursor by
	words, handle Delete.

	(gimp_text_tool_delete_text): add boolean "backspace" parameter
	and delete forward when it's FALSE.

	* app/actions/text-tool-commands.c: pass an arbitrary TRUE to
	gimp_text_tool_delete_text() (it's not used because when called
	from here, there is always a selection).


svn path=/trunk/; revision=27423
2008-10-26 19:54:27 +00:00
Martin Nordholts f9502d5abd Remove braces in formulas, makes everything look cleaner.
* app/gegl/gimpoperationpointlayermode.c: Remove braces in
formulas, makes everything look cleaner.

svn path=/trunk/; revision=27422
2008-10-26 19:39:07 +00:00
Martin Nordholts 5bb194a21d Clamp Addition and Subtract so that we acheieve consistent blending
* app/gegl/gimpoperationpointlayermode.c: Clamp Addition and
Subtract so that we acheieve consistent blending results. Also,
our Addition is fine, it is the formula for 'plus' in the SVG 1.2
draft that is wrong as far as I can see.

svn path=/trunk/; revision=27421
2008-10-26 19:28:47 +00:00
Martin Nordholts 65714a8ceb Continue the quest of overviewable and readable blend formulas. The macro
* app/gegl/gimpoperationpointlayermode.c: Continue the quest of
overviewable and readable blend formulas. The macro now expands to
entire case-statements.

svn path=/trunk/; revision=27420
2008-10-26 17:43:46 +00:00
Michael Natterer ee414d9e6f Merge on-canvas GSoC project:
2008-10-26  Michael Natterer  <mitch@gimp.org>

	Merge on-canvas GSoC project:

	* configure.in: check for pangocairo.

	* app/Makefile.am
	* app/text/Makefile.am: add its CFLAGS and LIBS.

	* app/text/gimptext-bitmap.[ch]
	* app/text/gimptext-private.h
	* app/text/gimptext-vectors.[ch]
	* app/text/gimptextlayer.c
	* app/text/gimptextlayout-render.c
	* app/text/gimptextlayout.c: port to pangocairo.

	* menus/Makefile.am
	* menus/text-tool-menu.xml
	* app/menus/menus.c
	* app/actions/Makefile.am
	* app/actions/actions.c
	* app/actions/text-tool-actions.[ch]
	* app/actions/text-tool-commands.[ch]: add a context menu for the
	text tool similar to GtkEntry's context menu.

	* app/tools/gimprectangletool.[ch]: add "narrow-mode" property.

	* app/tools/gimptextoptions.[ch]
	* app/widgets/gimptexteditor.[ch]: take a text buffer for the
	standalone text editor window instead of creating one internally.

	* app/tools/gimptexttool.[ch]: all the new wonderful on-canvas
	text editing logic. Wheee!


svn path=/trunk/; revision=27419
2008-10-26 17:39:55 +00:00
Sven Neumann b8d8f14749 added missing return value.
2008-10-26  Sven Neumann  <sven@gimp.org>

	* app/tools/gimptool.c (gimp_tool_get_popup): added
	missing return value.


svn path=/trunk/; revision=27418
2008-10-26 16:36:01 +00:00
Sven Neumann 076541df9a added missing return value.
2008-10-26  Sven Neumann  <sven@gimp.org>

	* app/tools/tool_manager.c (tool_manager_get_popup_active): 
added
	missing return value.


svn path=/trunk/; revision=27417
2008-10-26 16:31:52 +00:00
Michael Natterer 68e6d7a610 Add some infrastructure for the on-canvas text editing GSoC project:
2008-10-26  Michael Natterer  <mitch@gimp.org>

	Add some infrastructure for the on-canvas text editing GSoC
	project:

	* app/tools/gimptoolcontrol.[ch]: add boolean wants_all_key_events
	member and API to set and get it.

	* app/tools/gimptool.[ch]: add GimpTool::get_popup() which returns
	the tool's context menu if it has one, or NULL otherwise.

	* app/tools/tool_manager.[ch]: add tool_manager_get_popup_active()
	wrapper.

	* app/display/gimpdisplayshell-callbacks.c: check if the tool has
	a popup menu and show it instead of the usual right-click menu.

	Also call the tool's key_press() unconditionally if it wants all
	key events, but this code needs more thinking.


svn path=/trunk/; revision=27416
2008-10-26 16:25:24 +00:00
Martin Nordholts 21fce4e9b4 Increase readability by introducing short aliases.
* app/gegl/gimpoperationpointlayermode.c: Increase readability by
introducing short aliases.

svn path=/trunk/; revision=27413
2008-10-26 14:39:08 +00:00
Martin Nordholts 7e6f2fc304 For blend modes with conditions, fix so that the conditions are per color
* app/gegl/gimpoperationpointlayermode.c: For blend modes with
conditions, fix so that the conditions are per color
channel. Acheived by introducing a nice little preprocessor macro.

svn path=/trunk/; revision=27412
2008-10-26 14:19:38 +00:00
Martin Nordholts adc118ec9c Enable the [0..1] clamping of the output for Dodge and Burn. Without the
* app/gegl/gimpoperationpointlayermode.c: Enable the [0..1]
clamping of the output for Dodge and Burn. Without the clamping
one gets inconsistent results when blending together identical
layers but with different opacities. Maybe we should make the
clamping configurable and introduce a HDR compositing mode or
something?

svn path=/trunk/; revision=27411
2008-10-26 13:48:19 +00:00
Martin Nordholts a25fefff04 Implemented Grain Extract and Grain Merge. Also corrected the formula for
* app/gegl/gimpoperationpointlayermode.c: Implemented Grain
Extract and Grain Merge. Also corrected the formula for Divide.

Works the same for 100% opaque layers:
 o Grain Extract
 o Grain Merge

svn path=/trunk/; revision=27410
2008-10-26 08:39:41 +00:00
Martin Nordholts cdb3f70184 Implement a bunch of layer modes. Use the exact SVG 1.2 formula for layer
* app/gegl/gimpoperationpointlayermode.c: Implement a bunch of
layer modes. Use the exact SVG 1.2 formula for layer modes that
have a counterpart in SVG 1.2. Don't clamp the result to [0..1]
for Dodge and Burn though as we don't need to. Maybe we *should*
clamp from a compositing point of view, I'm not sure. Also
reformat the code a bit for readability.

Keep in mind that we now treat the opacity of all layers the same
indepentant of the layer mode. That is why most of the new
implementations doesn't work the same as the legacy ones when
transparency is involved, only when the layers are completely
opaque. Another important property for all layer modes implemented
below is that compositing onto complete transparency gives the
same result as if the layer would have been in Normal blending
mode.

The status of the new layer mode implementations compared to the
legacy implementations is as follows:

Completely works the same:
 o Behind

Works the same for 100% opaque layers:
 o Multiply
 o Screen
 o Difference
 o Darken
 o Lighten
 o Dodge
 o Burn
 o Hard Light
 o Subtract
 o Divide

Works different but similar:
 o Overlay

Work in progress:
 o Soft Light

svn path=/trunk/; revision=27409
2008-10-25 22:44:19 +00:00
Martin Nordholts 1f7b2c257e Completed the rename with gimp:layer-mode -> gimp:point-layer-mode and
* app/gegl/gimpoperationpointlayermode.c: Completed the rename
with gimp:layer-mode -> gimp:point-layer-mode and also did some
formating.

* app/core/gimplayer.c: Changed accordingly.

svn path=/trunk/; revision=27408
2008-10-25 21:02:46 +00:00
Michael Natterer 6a7af472ea Bug 557870 – "Qmask" message popping up here and there
2008-10-25  Michael Natterer  <mitch@gimp.org>

	Bug 557870 – "Qmask" message popping up here and there

	* app/display/gimpdisplayshell-title.c
	(gimp_display_shell_format_title): use
	gimp_viewable_get_description() instead of gimp_object_get_name()
	for displaying the active drawable's name so the quick mask and
	the floating selection have the same names as in the
	layers/channels dialogs.


svn path=/trunk/; revision=27405
2008-10-25 15:29:35 +00:00
Martin Nordholts 67c80e1574 Rename to
* app/gegl/gimpoperationlayermode.[ch]: Rename to

* app/gegl/gimpoperationpointlayermode.[ch]: so that we can later
create a common GimpOperationLayerMode class/interface for
non-point layer modes like GimpOperationDissolveLayerMode.

* app/gegl/Makefile.am
* app/gegl/gimp-gegl.c
* app/gegl/gegl-types.h: Adjust accordingly.

svn path=/trunk/; revision=27401
2008-10-25 14:16:22 +00:00
Martin Nordholts 1a19f7315a Instead of having one GEGL operation per layer mode, make
GimpOperationLayerMode instantiable and add a GimpLayerModeEffects
property to it that we check in ::process() to blend pixels
together.

* app/gegl/gimpoperationlayermode.[ch]: Do the change described
above. Currently only Normal and Addition are implemented. Normal
so that we don't need a special case for the gegl:normal op. Also,
the Dissolve layer mode is not a point op and needs to be
implemented elsewhere.

* app/gegl/gimpoperation*mode.c: Removed.

* app/gegl/gimp-gegl-utils.[ch]: Removed
gimp_layer_mode_to_gegl_operation().

* app/core/gimplayer.c

* app/gegl/Makefile.am
* app/gegl/gimp-gegl.c: Adapt.

svn path=/trunk/; revision=27400
2008-10-25 13:29:55 +00:00
Michael Natterer f0c79b81e3 Merge a modified and enhanced patch from the vector layer branch:
2008-10-25  Michael Natterer  <mitch@gimp.org>

	Merge a modified and enhanced patch from the vector layer branch:

	* app/core/gimpdrawable-stroke.[ch]: add new public API
	gimp_drawable_fill_boundary() and gimp_drawable_fill_vectors().

	Split the internal code up so that there are functions which turn
	the BoundSegs and GimpVectors into a GimpScanConvert and changed
	gimp_drawable_stroke_scan_convert() so it can either fill the
	shape or stroke it.


svn path=/trunk/; revision=27399
2008-10-25 13:12:48 +00:00
Michael Natterer 39af762f61 More merging from SOC 2006's vector layer branch:
2008-10-25  Michael Natterer  <mitch@gimp.org>

	More merging from SOC 2006's vector layer branch:

	* app/core/gimpitem.[ch]: add "gboolean push_undo" to
	GimpItem::stroke().

	* app/core/gimpdrawable-stroke.[ch]
	* app/paint/gimppaintcore-stroke.[ch]
	* app/paint/gimppaintcore.[ch] (gimp_paint_core_finish): add
	"push_undo" parameters here too.

	* app/actions/select-commands.c
	* app/actions/vectors-commands.c
	* app/core/gimpchannel.c
	* app/core/gimpselection.c
	* app/dialogs/stroke-dialog.c
	* app/tools/gimppainttool.c
	* app/vectors/gimpvectors.c
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/paint_tools.pdb
	* tools/pdbgen/pdb/paths.pdb: pass TRUE all over the place.

	* app/pdb/edit-cmds.c
	* app/pdb/paint-tools-cmds.c
	* app/pdb/paths-cmds.c: regenerated.


svn path=/trunk/; revision=27398
2008-10-25 11:59:03 +00:00
Martin Nordholts 5c05c609e4 Make layer modes work on premultiplied data. This makes compositing 40%
* app/gegl/gimpoperationlayermode.c: Make layer modes work on
premultiplied data. This makes compositing 40% faster on my test
image with 10 interlaced Normal and Addition mode layers.

* app/gegl/gimpoperationadditionmode.c: Switch to the
premultiplied algorithm and remove the experimental ones. The new
Addition mode has two important differences over the legacy
Addition mode:

  o Addition mode now really is commutative as the GIMP
    documentation says (this wasn't previously the case).

  o Layers in Addition mode are just as opaque as Normal
    layers. That is, their effect on the composite alpha channel
    is the same. For discussion, refer to bug #387449.

svn path=/trunk/; revision=27396
2008-10-25 09:47:09 +00:00
Michael Natterer f096382af5 formatting.
2008-10-25  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimppaintoptions.h: formatting.


svn path=/trunk/; revision=27395
2008-10-25 09:18:49 +00:00
Michael Natterer a92925361b bail out if the notification is not about one of our own properties (but
2008-10-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpcontext.c (gimp_context_parent_notify): bail out if
	the notification is not about one of our own properties
	(but from a subclass).


svn path=/trunk/; revision=27394
2008-10-25 09:14:16 +00:00
Michael Natterer efb6d15acf add "gboolean use_context_color" parameter to gimp_stroke_options_new()
2008-10-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpstrokeoptions.[ch]: add "gboolean use_context_color"
	parameter to gimp_stroke_options_new() and set the passed context
	as parent of the new options only if it's TRUE. Also fixed the
	GimpConfig::duplicate() implementation to really duplicate the
	object and not just return an object containing default values.

	* app/core/gimpfilloptions.[ch]: add gimp_fill_options_new().

	* app/actions/select-commands.c
	* app/dialogs/stroke-dialog.c
	* app/actions/vectors-commands.c
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/paths.pdb: pass TRUE to gimp_stroke_options_new().

	* app/pdb/edit-cmds.c
	* app/pdb/paths-cmds.c: regenerated.


svn path=/trunk/; revision=27393
2008-10-25 08:52:20 +00:00
Michael Natterer 90c26cf10e add non-serializable properties pattern-view-type and pattern-view-size
2008-10-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpfilloptions.[ch]: add non-serializable properties
	pattern-view-type and pattern-view-size which are used only by the
	new UI below.

	* app/widgets/gimpfilleditor.[ch]: added boolean edit-context
	property. If TRUE, add widgets to edit the context's foreground and
	pattern. Add "edit_context" parameter to gimp_fill_editor_new().

	* app/widgets/gimpstrokeeditor.[ch]: add the same parameter here.

	* app/widgets/gimpwidgets-utils.[ch]: add gimp_enum_radio_box_add()
	which does the same as the existing gimp_enum_radio_frame_add().

	* app/dialogs/stroke-dialog.c: pass FALSE for "edit_context"
	because this dialog takes its foreground and pattern from the user
	context and doesn't need it's own GUI for them.


svn path=/trunk/; revision=27392
2008-10-24 22:34:24 +00:00
Michael Natterer 9c299a8f03 app/widgets/Makefile.am app/widgets/widgets-types.h new widget factored
2008-10-24  Michael Natterer  <mitch@gimp.org>

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimpfilleditor.[ch]: new widget factored out of
	GimpStrokeEditor.

	* app/widgets/gimpstrokeeditor.[ch]: derive from GimpFillEditor
	and remove UI for the properties of GimpFillOptions.


svn path=/trunk/; revision=27390
2008-10-24 17:55:30 +00:00
Michael Natterer 1a453c37df app/core/Makefile.am app/core/core-types.h remove this mis-engineered
2008-10-24  Michael Natterer  <mitch@gimp.org>

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpstrokedesc.[ch]: remove this mis-engineered
	abstraction...

	* app/core/gimpstrokeoptions.[ch]: ...and add its properties and
	API here.

	* app/core/gimpitem.[ch]: GimpItem::stroke() take a
	GimpStrokeOptions instead of a GimpStrokeDesc.

	* app/core/gimpchannel.c
	* app/core/gimpselection.c
	* app/vectors/gimpvectors.c
	* app/actions/select-commands.c
	* app/actions/vectors-commands.c
	* app/dialogs/stroke-dialog.c
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/paths.pdb: changed accordingly.

	* app/pdb/edit-cmds.c
	* app/pdb/paths-cmds.c: regenerated.


svn path=/trunk/; revision=27388
2008-10-24 07:37:46 +00:00
Sven Neumann 4260576f0e to be on the safe side, always show hidden dialogs when the Tab key is
2008-10-24  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpdialogfactory.c 
(gimp_dialog_factories_toggle):
	to be on the safe side, always show hidden dialogs when the Tab
	key is used. It should not be possible to get a Tab key-press
	while all displays are iconified, but you never know ...


svn path=/trunk/; revision=27385
2008-10-24 07:16:06 +00:00
Sven Neumann bf97ad3102 Bug 556896 – Dialogs don't get minimized with single image window
2008-10-24  Sven Neumann  <sven@gimp.org>

	Bug 556896 – Dialogs don't get minimized with single image 
window

	* app/widgets/gimpdialogfactory.[ch]: renamed the new methods to
	gimp_dialog_factories_{show|hide}_with_display().
	Remember if the dialogs were hidden using
	gimp_dialog_factories_hide_with_display() or using
	gimp_dialog_factories_toggle() and keep this into account when
	making them visible again. This ensures that dialogs that were
	hidden using the Tab key won't be shown when the image window is
	uniconified.

	* app/display/gimpdisplayshell.c
	(gimp_display_shell_window_state_event): changed accordingly.


svn path=/trunk/; revision=27384
2008-10-24 06:48:56 +00:00
Michael Natterer 50ad791fff Another merge from the vector layer branch:
2008-10-24  Michael Natterer  <mitch@gimp.org>

	Another merge from the vector layer branch:

	* app/core/gimpstrokedesc.c (gimp_stroke_desc_new): make sure
	each stroke desc always has GimpPaintInfo.


svn path=/trunk/; revision=27383
2008-10-23 22:48:46 +00:00
Martin Nordholts 06b46fef6d For alpha compositing consistency, all layers should affect alpha in the
* app/gegl/gimpoperationadditionmode.c: For alpha compositing
consistency, all layers should affect alpha in the same way
independent of layer mode. Replace the compositing algorithm with
a version without the flaws discovered so far in the previous
ones. Don't use it yet though as it requires premultiplied data.

svn path=/trunk/; revision=27382
2008-10-23 22:14:44 +00:00
Sven Neumann 8626bed826 use the inverse of the scale factor so that we can multiply instead of
2008-10-24  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c (scale): use the inverse of the
	scale factor so that we can multiply instead of dividing in the
	loops.


svn path=/trunk/; revision=27380
2008-10-23 22:07:59 +00:00
Michael Natterer 3dfef0f15a rename GimpStrokeStyle to GimpFillStyle.
2008-10-23  Michael Natterer  <mitch@gimp.org>

	* app/core/core-enums.[ch]: rename GimpStrokeStyle to GimpFillStyle.

	* app/core/gimpfilloptions.[ch]
	* app/core/gimpdrawable-stroke.c
	(gimp_drawable_stroke_scan_convert): changed accordingly.


svn path=/trunk/; revision=27379
2008-10-23 21:30:28 +00:00
Michael Natterer 67a5eaea68 Merge a part of SOC 2006's vector layer branch:
2008-10-23  Michael Natterer  <mitch@gimp.org>

	Merge a part of SOC 2006's vector layer branch:

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpfilloptions.[ch]: new GimpContext subclass factored
	out of GimpStrokeOptions. Has "style" and "antialias" properties.

	* app/core/gimpstrokeoptions.[ch]: derive from GimpFillOptions
	and remove said properties.

	* app/core/gimpdrawable-stroke.c
	(gimp_drawable_stroke_scan_convert): changed accordingly.


svn path=/trunk/; revision=27378
2008-10-23 21:18:39 +00:00