Commit Graph

37 Commits

Author SHA1 Message Date
Michael Natterer 96df3c2a08 app: formatting 2010-10-03 02:39:04 +02:00
Michael Natterer d6f035a934 app: bye bye XOR :D 2010-09-24 21:03:51 +02:00
Michael Natterer e7f1d444c3 app: remove much more dead code paths from the draw tool and the canvas 2010-09-24 19:08:19 +02:00
Michael Natterer 41c338ce93 app: remove XOR drawing code paths which are now dead 2010-09-24 02:11:04 +02:00
Michael Natterer 7e28f52dd7 app: remove unused clipping functions in GimpDrawTool and GimpCanvas 2010-09-19 18:58:23 +02:00
Michael Natterer 02abdff8aa app: move the wilber drawing functions to gimpcairo.c 2010-08-28 15:30:02 +02:00
Michael Natterer f0c40d3717 app: port GimpDisplayShell image drawing to cairo 2010-08-27 23:15:25 +02:00
Michael Natterer a6ce99afe0 app: remove point drawing API from GimpCanvas, it's not used any longer 2010-08-26 21:01:21 +02:00
Michael Natterer be2bd189cd app: completely switch to cairo-drawing the selection
and remove all old selection drawing code. Thanks to Benjamin Otte for
pointing out the right optimization.

Also fixes bug #479875 - performance problem drawing a complex selection.
2010-08-26 20:52:52 +02:00
Michael Natterer 4e0925a67c app: port GimpDisplayShell layer boundary drawing to cairo
The boundary is temporarily kept around as both BoundSeg and
GdkSegment arrays now, but this uglyness will go away once porting to
cairo is complete.
2010-08-24 18:07:31 +02:00
Michael Natterer 18d3882c5c app: port GimpDisplayShell pen drawing to cairo 2010-08-23 21:59:27 +02:00
Michael Natterer 3a1ba90507 app: port GimpDisplayShell cursor drawing to cairo
Also add code to invalidate the new cursor location in
gimp_display_shell_update_cursor(), which is needed with
the new manual double buffering code.
2010-08-23 20:39:22 +02:00
Michael Natterer 1d1ff1fedd app: port GimpDisplayShell sample point drawing to cairo
Same disclaimer about tool uglyness applies here. Will be fixed.
2010-08-12 13:13:15 +02:00
Michael Natterer 922c330bec app: port GimpDisplayShell guide drawing to cairo
The cairo_t code in GimpMoveTool is still disgusting. This probably
needs some GimpTool API that creates a cairo_t for tools.
2010-08-12 00:51:58 +02:00
Michael Natterer 1f8d2e66e1 app: make clip rect and clip region parameters const 2010-05-02 16:06:15 +02:00
Michael Natterer 8124792130 Derive GimpCanvas from GimpOverlayBox
- adapt callbacks to ignore / not block events on offscreen children
- use GimpOverlayBox' scroll API which makes sure overlay children
  don't scroll along
2009-10-18 22:19:29 +02:00
Michael Natterer 27d036b75f Render a layer group's boundary in a different color
This is probably not sufficient, but better than nothing.
2009-08-29 21:26:46 +02:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
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
2009-01-17 22:28:01 +00:00
Michael Natterer ce00697368 #define GIMP_CANVAS_EVENT_MASK.
2008-08-22  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpcanvas.h: #define GIMP_CANVAS_EVENT_MASK.

	* app/display/gimpcanvas.c (gimp_canvas_realize): use it here.


svn path=/trunk/; revision=26713
2008-08-22 16:05:46 +00:00
Michael Natterer c1e13e2c5d add gimp_canvas_scroll() which scrolls the canvas and makes the result
2008-08-22  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpcanvas.[ch]: add gimp_canvas_scroll() which
	scrolls the canvas and makes the result visible immediately.

	* app/display/gimpdisplayshell-scroll.c
	(gimp_display_shell_scroll): use the new function.


svn path=/trunk/; revision=26712
2008-08-22 15:57:41 +00:00
Michael Natterer 041fd8e125 turn into a GtkContainer subclass mainly to reduce the diff to a local
2008-08-21  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpcanvas.[ch]: turn into a GtkContainer subclass
	mainly to reduce the diff to a local hack I'm at. Also swallow
	some code that used to be called on the canvas widget externally.

	* app/display/gimpdisplayshell.c (gimp_display_shell_new): remove
	the swallowed code.

	* app/display/gimpdisplayshell-callbacks.h: remove canvas event
	mask define.


svn path=/trunk/; revision=26708
2008-08-21 23:55:58 +00:00
Michael Natterer 598da617b0 Stop including single headers from gtk+ to be prepared for the upcoming
2008-05-23  Michael Natterer  <mitch@gimp.org>

	Stop including single headers from gtk+ to be prepared
	for the upcoming GTK_DISABLE_SINGLE_INCLUDES:

	* configure.in: add -DGTK_DISABLE_SINGLE_INCLUDES to CPPFLAGS.

	* app/display/gimpcanvas.h
	* app/display/gimpscalecombobox.h
	* app/display/gimpstatusbar.h
	* app/widgets/*.h
	* libgimp/gimpprogressbar.h
	* libgimp/gimpselectbutton.h
	* libgimpwidgets/*.h
	* libgimpwidgets/gimpstock.c
	* plug-ins/uri/gimpmountoperation.h: remove inclusion of parent
	classes and single files from gtk+.

	* app/widgets/gtkwrapbox.h
	* libgimp/gimpbrushmenu.c
	* libgimp/gimpfontmenu.c
	* libgimp/gimpgradientmenu.c
	* libgimp/gimppalettemenu.c
	* libgimp/gimppatternmenu.c
	* libgimp/gimpselectbutton.c: #include <gtk/gtk.h>

	* plug-ins/common/poppler.c: undef GTK_DISABLE_SINGLE_INCLUDES
	when including <poppler.h>.


svn path=/trunk/; revision=25781
2008-05-23 20:38:52 +00:00
Michael Natterer 7301aaaeae improve wilber scaling and remove the drop zone layout.
2008-03-26  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpcanvas.[ch]: improve wilber scaling and remove
	the drop zone layout.

	* app/display/gimpdisplayshell.c: add a tooltip instead.


svn path=/trunk/; revision=25241
2008-03-26 13:49:27 +00:00
Michael Natterer e2f6294c07 add gimp_canvas_draw_drop_zone() which simply renders a big "Drop Here" on
2008-03-18  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpcanvas.[ch]: add gimp_canvas_draw_drop_zone()
	which simply renders a big "Drop Here" on the canvas. Replaced
	Gimp member and construct property by GimpDisplayConfig.

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


svn path=/trunk/; revision=25112
2008-03-18 20:24:49 +00:00
William Skaggs 2ba3e595bc Bill Skaggs <weskaggs@primate.udavis.edu>
committing patch by Simon Budig to give an indication
	when working on a layer mask, updated to fix staleness
	and respond to "edit-changed".  Might fix bug #132204.
	
	* app/core/core-enums.[ch]: add GIMP_SELECTION_LAYER_ON.

	* app/core/gimplayermask.c: add handler for "edit-changed".

	* app/core/gimpcanvas.[ch]:  add new style
	GIMP_CANVAS_STYLE_LAYER_MASK_ACTIVE.

	* app/display/gimpdisplayshell-selection.c: use new style
	when layer mask is active.

svn path=/trunk/; revision=24520
2008-01-03 21:53:34 +00:00
Sven Neumann 9ae026c39e Make XOR color configurable (bug #421466):
2007-03-23  Sven Neumann  <sven@gimp.org>

	Make XOR color configurable (bug #421466):

	* app/config/gimprc-blurbs.h
	* app/config/gimpdisplayconfig.[ch]: added gimprc option for the
	XOR color.

	* app/display/gimpcanvas.[ch]: keep a reference to the Gimp object
	and take the XOR color from GimpDisplayConfig.

	* app/display/gimpdisplayshell.c: pass gimp to gimp_canvas_new().

svn path=/trunk/; revision=22164
2007-03-23 09:25:28 +00:00
Sven Neumann 41237259c9 In all files, changed the standard copyright notice to say "GIMP - The GNU
2006-12-09  Sven Neumann  <sven@gimp.org>

        * In all files, changed the standard copyright notice to say
        "GIMP - The GNU Image Manipulation Program".
2006-12-09 21:33:38 +00:00
William Skaggs 7903feff20 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/display/gimpcanvas.[ch]
	* app/tools/gimpdrawtool.[ch]: remove recently added code relating
	to stippled xor drawing -- not handled well by some display
	drivers.

	* app/tools/gimprectangletool.c: improve drawing of handles.
2006-09-20 20:23:49 +00:00
William Skaggs 3c2c165b9c Bill Skaggs <weskaggs@primate.ucdavis.edu>
Trying to implement some usability recommendations from
	Peter Sikking: bigger handles, more feedback to user.

	* app/display/gimpcanvas.[ch]: add
	GIMP_CANVAS_STYLE_XOR_STIPPLED to set of styles.

	* app/tools/gimpdrawtool.[ch]
	(gimp_draw_tool_draw_rectangle_stippled): new function.
	Needs a better stipple pattern, though.

	* app/tools/gimprectangletool.c: bigger handles in corners,
	and highlight thing that user is currently moving.
2006-09-15 00:01:59 +00:00
Tor Lillqvist de642dd10f Add new GimpCanvasStyle value, GIMP_CANVAS_STYLE_XOR_DOTTED.
2005-06-24  Tor Lillqvist  <tml@novell.com>

	* app/display/gimpcanvas.h: Add new GimpCanvasStyle value,
	GIMP_CANVAS_STYLE_XOR_DOTTED.

	* app/display/gimpcanvas.c (gimp_canvas_gc_new): Implement it like
	GIMP_CANVAS_STYLE_XOR_DASHED, except that we set the dash pattern
	to a single-pixel on-off one.

	* app/tools/gimpdrawtool.c (gimp_draw_tool_draw_boundary): Sort
	the boundary so that we can draw each connected group of segments
	using gimp_canvas_draw_lines(). (Even if we would still use
	gimp_canvas_draw_segments(), the boundary would have to be sorted
	so that the XOR drawing and GDK_CAP_NOT_LAST cooperate properly.)

	Use GIMP_CANVAS_STYLE_XOR_DOTTED so the outline doesn't look too
	heavy.

	Remove the dubious code snippet that offset some segments by one
	pixel. It didn't do what the comment claimed, and why one would
	need to do what the comment said, or what it actually did, is
	unclear.

	Now brush outlines shouldn't have gaps any longer. (#308710)
2005-06-24 23:28:38 +00:00
Sven Neumann f579c11f3b fixed gtk-doc comments; added G_GNUC_PRINTF attribute.
2005-03-23  Sven Neumann  <sven@gimp.org>

	* app/display/gimpcanvas.[ch] (gimp_canvas_draw_text): fixed
	gtk-doc comments; added G_GNUC_PRINTF attribute.
2005-03-23 13:53:31 +00:00
Michael Natterer f41e059067 More sample point stuff. Addresses bug #137776.
2005-03-09  Michael Natterer  <mitch@gimp.org>

	More sample point stuff. Addresses bug #137776.

	* app/core/gimpimage-sample-points.c
	* app/core/gimpimage-undo-push.c: append, not prepend the sample
	paints to the image's list because their index matters. Update
	sample points when their index changes.

	* app/display/gimpcanvas.[ch]: added own sytles for the sample
	points.  Added gimp_canvas_draw_text() which uses a PangoLayout
	which is cached in the canvas.

	* app/display/gimpdisplayshell-draw.c
	(gimp_display_shell_draw_sample_point): draw the sample points
	more distinct from guides using the new canvas APIs above.

	* app/display/gimpdisplayshell-callbacks.c
	(gimp_display_shell_[hv]ruler_button_press): factored out all
	code to

	(gimp_display_shell_ruler_burron_press): which takes a boolean
	"horizontal" variable and allows to add sample points with
	<control>+drag.

	* app/tools/gimpcolortool.[ch]: implement adding, moving and
	removing of sample points in the same way as the move tool moves
	guides.

	* app/tools/gimpcolorpickertool.c
	(gimp_color_picker_tool_oper_update): chain up.
2005-03-09 00:23:19 +00:00
Sven Neumann d456168ad9 added gimp_canvas_set_clip_region().
2003-11-11  Sven Neumann  <sven@gimp.org>

	* app/display/gimpcanvas.[ch]: added gimp_canvas_set_clip_region().

	* app/display/gimpdisplayshell-callbacks.c
	(gimp_display_shell_canvas_expose): if gimp_display_shell_pause()
	would cause a redraw, make sure that no XOR drawing happens on
	areas that have already been cleared by the windowing system.
	Fixes bug #115712.
2003-11-11 17:07:41 +00:00
Sven Neumann 4b165b472c app/display/Makefile.am removed this file.
2003-11-11  Sven Neumann  <sven@gimp.org>

	* app/display/Makefile.am
	* app/display/gimpdisplayshell-marching-ants.h: removed this file.

	* app/display/gimpcanvas.[ch]: generalized creation of GCs. Added
	styles for drawing the selection and layer boundaries. Also added
	support for changing stipple masks as was used by an older
	implementation of the marching ants (see below).

	* app/display/gimpdisplayshell-callbacks.c
	* app/display/gimpdisplayshell.c: don't create the Selection when
	the canvas is realized but only once when it is created.

	* app/display/gimpdisplayshell-selection.[ch]: removed all GC code
	and draw by means of GimpCanvas. Also resurrected a different
	implementation of the marching ants that was lost since 1.2
	(#undef USE_DRAWPOINTS).
2003-11-11 14:50:07 +00:00
Sven Neumann 058764f4ba app/display/gimpcanvas.[ch] moved GC from the the draw tool to GimpCanvas.
2003-11-10  Sven Neumann  <sven@gimp.org>

	* app/display/gimpcanvas.[ch]
	* app/tools/gimpdrawtool.[ch]: moved GC from the the draw tool to
	GimpCanvas. Added wrappers around GDK drawing functions and do all
	canvas drawing by means of these new functions.

	* app/display/gimpdisplayshell-appearance.c
	* app/display/gimpdisplayshell-render.c
	* app/display/gimpdisplayshell.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpfuzzyselecttool.c: draw using the new GimpCanvas
	functions.
2003-11-10 19:35:56 +00:00
Sven Neumann cf842d8761 app/display/gimpcanvas.[ch] moved GdkGCs to GimpCanvas; still work in
2003-11-10  Sven Neumann  <sven@gimp.org>

	* app/display/gimpcanvas.[ch]
	* app/display/gimpdisplayshell.c: moved GdkGCs to GimpCanvas;
	still work in progress...
2003-11-10 01:10:46 +00:00
Sven Neumann 621c5832db app/display/Makefile.am app/display/display-types.h added GimpCanvas,
2003-11-10  Sven Neumann  <sven@gimp.org>

	* app/display/Makefile.am
	* app/display/display-types.h
	* app/display/gimpcanvas.[ch]: added GimpCanvas, derived from
	GtkDrawingArea.

	* app/display/gimpdisplayshell-callbacks.c
	* app/display/gimpdisplayshell-render.c
	* app/display/gimpdisplayshell.[ch]
2003-11-09 23:24:40 +00:00