Michael Natterer
503a9cebce
app: implement GObject::constructed() instead of ::constructor()
2011-01-13 10:06:07 +01:00
Michael Natterer
70574877d3
app: use GimpSpinScale for the new smoothing options
...
This drops the log scale, but the new widget will get a better
solution for this anyway. Also did some cleanup.
2011-01-09 00:21:10 +01:00
Michael Natterer
c29aefccc2
app: fix coding style in the new smoothing code
2011-01-08 22:18:56 +01:00
Alexia Death
339deed1da
app: Clean up smooth so it would be acceptable for master
2011-01-08 22:19:27 +02:00
Alexia Death
082aa272a4
app: G-Pen algorithm for GIMP trunk. Now smoothing function works for Ink and Brush tools.
...
Rebased/fixed to go on top of current master. Next commit will add cleanup.
Had to change author tag because gnome is not accepting random stuff
in email fields. Original author is tarai, from gimp painter project
in sourceforge.
2011-01-08 22:17:26 +02:00
Michael Natterer
4aa36044f7
app: no need to set GTK_UPDATE_DELAYED on the levels scale
...
because we idle preview anyway in GimpImageMap.
2011-01-07 19:33:45 +01:00
Michael Natterer
6d6ec38085
app: no need to set a GtkRange's update-policy to CONTINUOUS
...
because it's the default.
2011-01-07 17:18:48 +01:00
Michael Natterer
36de5a2ab1
Bug 630376 - Crash with text layer / text tools stay on canvas when text info is discarded
...
Halt the tool when the text layer's text disappears.
2010-11-28 15:28:28 +01:00
Michael Natterer
357e25bfd1
app: move the cage tool after all other transform tools, not before them
2010-11-28 13:16:35 +01:00
Michael Natterer
bbc3943638
app: some cleanup in the new paint options code
2010-11-25 21:30:29 +01:00
Alexia Death
904048cdcb
app: Clearly present Fade and Color dynamics options as such
2010-11-25 19:06:16 +02:00
Michael Natterer
d46b53f63d
Bug 635040 - Edit -> Stroke Path performs no action on an incomplete path
...
Add error reporting to gimp_drawable_stroke_vectors() and produce the
same warning as the paint core when trying to stroke a path with zero
or one points only.
2010-11-25 11:31:40 +01:00
Michael Natterer
65c6264259
app: change icon for brush size reset button and add tooltip
2010-11-24 22:31:56 +01:00
Michael Natterer
223ae53fcc
app: set the cage tool's dirty mask so it is canceled upon image changes
2010-11-21 14:13:58 +01:00
Michael Natterer
b5ece8b364
app: the ink sensitivity spin scales need two decimal digits precision
2010-11-19 15:19:24 +01:00
Michael Natterer
7a3dc6ee38
app: remove unused #includes
2010-11-15 00:23:18 +01:00
Michael Natterer
c4cd420ef8
app: rename GIMP_INK_BLOB_TYPE_ELLIPSE to GIMP_INK_BLOB_TYPE_CIRCLE
...
- TYPE_SQUARE is also named SQUARE and not RECTANGLE
- serialization doesn't suffer from the changed name because it's the
default value that never gets serialized
- a lot of messy code in the ink options can be replaced by a one-liner
because the enum names now match their resp. stock items
2010-11-14 16:29:42 +01:00
Michael Natterer
dc9018bd14
app: implement GimpTool::options_notify()
2010-11-10 19:08:39 +01:00
Alexia Death
5fa1e9ea40
app: Tell the user how to commit the cage transform
2010-11-10 19:11:49 +02:00
Michael Natterer
ef44bfedad
app: check for GIMP_BUTTON_RELEASE_CANCEL, not GDK_BUTTON3_MASK
2010-11-10 14:39:30 +01:00
Mikael Magnusson
372bc90f65
app: fix right-click cancelling a transform tool
...
to only revert back to before the current drag, not do a full reset
2010-11-10 14:39:06 +01:00
Mikael Magnusson
d6e76a10d6
app: fix redraw after cancelling a transform tool with right-click cancelling
2010-11-10 14:35:27 +01:00
Michael Natterer
32926c9b6a
app: implement GimpTool::options_notify()
...
instead of connecting to the tool options manually.
2010-11-10 14:20:33 +01:00
Michael Natterer
9e5eca8fd1
app: add virtual function GimpTool::options_notify()
...
which gets called on each "notify" from the tool options. This way
tool can simply implement this method instead of connecting to
"notify" themselves individually.
2010-11-10 14:18:33 +01:00
Michael Natterer
f6a284dc4c
app: use a canvas progress in the cage tool
...
This is a proof-of-concept hack that needs review and comments before
being used generally.
2010-11-09 19:35:54 +01:00
Michael Natterer
63fcfb15a2
app: use the new shifting API instead of reimplementing it
2010-11-09 11:32:40 +01:00
Michael Natterer
3f6a70f7fe
app: define one more standard tool handle size
2010-11-08 22:48:50 +01:00
Michael Natterer
cf0402f069
app: consistent handle sizes for tool drawing
...
Replace a myriad of defines in different tools by three consistent
sizes defined in gimpdrawtool.h.
2010-11-08 22:37:00 +01:00
Michael Natterer
a73348c561
app: fix handle hovering detection, it was using the wrong radius
2010-11-06 00:06:13 +01:00
Michael Natterer
31aa09a11f
app: add proper cursors that show what will happen
2010-11-06 00:06:13 +01:00
Michael Natterer
9d604a545f
app: move all the cage modifying logic to button_release()
...
so any interaction can be canceled by holding BUTTON3 while
releasing. Add additional state "hovering_handle" so we can do proper
drawing that matches what will happen on mouse interaction.
2010-11-05 23:49:48 +01:00
Michael Natterer
f4c98fbad6
app: don't use a GimpVector2 for the cursor position
...
because less code is more readable.
2010-11-05 22:30:10 +01:00
Michael Natterer
9867cf62c3
app: -1000 is a valid cursor position, use G_MINDOUBLE as "no cursor"
2010-11-05 22:25:14 +01:00
Michael Natterer
baf964a734
app: rename member handle_moved to moving_handle
2010-11-05 22:21:56 +01:00
Michael Natterer
038a6dd671
app: no need to abort the image map when a handle changes
2010-11-05 21:05:54 +01:00
Michael Natterer
77bb31ba51
app: put the drawn lines into a stroke group
2010-11-05 20:00:20 +01:00
Michael Natterer
86a220bbdf
app: remove the preview node and other unneeded stuff
...
and simplify the code even further.
2010-11-05 19:47:57 +01:00
Michael Natterer
6f31f3d2f6
app: pass the drawable to gimp_cage_tool_create_image_map()
2010-11-05 19:42:42 +01:00
Michael Natterer
2028d547a2
app: use the GimpImageMap as it's meant to be used
...
Have an incremental live preview of the rendering and actually use the
rendering instead of throwing it away and doing it all over again on
commit. gimp_cage_tool_process() is therefore currently unused but I
left it there for Alexia to fix the tool for layers with masks.
2010-11-05 19:10:03 +01:00
Michael Natterer
e0dad1bf35
app: canonicalize cage op names, and some indentation fixes
2010-11-05 12:45:07 +01:00
Michael Natterer
eb3db78b06
app: rename config->cage_vertice_number to config->n_cage_vertices
...
and some minor cleanup.
2010-11-05 10:04:45 +01:00
Michael Natterer
09aae9a919
app: more minor cage tool cleanup
2010-11-05 09:49:03 +01:00
Michael Natterer
c98688873d
app: more minor cage cleanup
2010-11-04 22:47:03 +01:00
Michael Natterer
a6d85e8d57
app: more formatting cleanup
2010-11-04 22:38:41 +01:00
Michael Natterer
f6a8ad61fa
app: remove useless box from cage options gui
2010-11-04 22:32:01 +01:00
Michael Natterer
428e8541c3
app: remove unused #includes
2010-11-04 22:30:30 +01:00
Michael Natterer
b7a674285f
app: derive GimpCageOptions directly from GimpToolOptions
2010-11-04 22:28:47 +01:00
Michael Natterer
33a8c15403
app: large scale formatting cleanup in the new cage code
...
- move enum to the new gimp-gegl-enums.[ch]
- clean up includes
- spacing
- indentation
- coding style
2010-11-04 22:16:27 +01:00
Martin Nordholts
5ce581f797
app: Use Shift+G for Cage Tool
...
We can't use Shift+R which is taken by the rotate tool, so use Shift+G
instead. G is for "Green coordinate".
2010-11-04 21:44:31 +01:00
Michael Natterer
26ca306cc9
app: Makefile formatting cleanup
2010-11-04 21:08:51 +01:00
Alexia Death
d2563a69fd
app: Cleanup in preparation of merge
2010-11-04 20:27:11 +02:00
Alexia Death
dfd5470a2e
Merge remote branch 'origin/master' into soc-2010-cage-2
2010-11-04 20:00:36 +02:00
Alexia Death
27c77e6a5e
Merge branch 'master' into soc-2010-cage-2
2010-11-04 00:41:45 +02:00
Alexia Death
9b96120c31
app: Make cage tool behave nice with offset layers
2010-11-04 00:26:43 +02:00
Alexia Death
e529428a68
app: Make cage tool apply to layer mask as well if one is present
2010-11-04 00:26:04 +02:00
Michael Natterer
9208834880
app: make the blob shape widgets more compact
2010-11-03 09:53:18 +01:00
Michael Natterer
aa846ec451
app: use spin scales for the ink options
2010-11-02 23:30:47 +01:00
Michael Natterer
d5ff5b6748
app: get rid of more tables in the tool options and fix up spacing a bit
2010-11-02 22:14:34 +01:00
Michael Natterer
6ee6fb9b81
app: use a spin scale for the aspect ratio
...
even though a non-log scale is totally broken here, but that at least
creates pressure for finding a solution...
2010-11-02 22:01:15 +01:00
Michael Natterer
bf14241f26
app: make the brush size reset button smaller
2010-11-02 21:57:37 +01:00
Alexia Death
1ae2ad8566
app: Generic cage cleanup
2010-11-02 21:28:30 +02:00
Alexia Death
f09f6dae06
app: Make cage tool work with gegl master
2010-11-02 20:56:53 +02:00
Mikael Magnusson
90e525ca09
app: use a spin scale for the brush size (have to limit size to 1000 temporarily)
2010-11-02 14:41:21 +01:00
Michael Natterer
8f991c5950
app: make the brush, pattern etc selecing boxes more compact
...
by integrating their label instead of requiring one externally. This
way we get rid of some more labels in the tool options. Also clean up
tool options further (add more spin scales, and some general
reordering and spacing cleanup).
2010-11-02 14:05:47 +01:00
Michael Natterer
9cb69b80be
app: minor fixes
2010-11-01 23:38:17 +01:00
Michael Natterer
7af8cc0e4d
app: use a spin scale for fade-length
2010-11-01 22:19:59 +01:00
Michael Natterer
7bfdf76a47
app: use the new opacity prop scale
2010-11-01 22:07:55 +01:00
Michael Natterer
0a98d16814
app: use spin scales for all trivial cases in tool options
2010-11-01 21:48:59 +01:00
Michael Natterer
fc0e19022e
app: use a spin scale for the jitter amount
2010-11-01 21:03:01 +01:00
Michael Natterer
5e58df8aa8
app: use a GimpSpinScale for the brush angle, please test and comment!
2010-11-01 20:04:53 +01:00
Martin Nordholts
df0772fcde
app: Add 'crop_set_width_without_pending_rect' regression test
...
Add regression test 'crop_set_width_without_pending_rect' for "Bug
322396 - Crop dimension entering causes crash".
2010-10-31 15:09:03 +01:00
Martin Nordholts
48690d60e1
app: Add gimp_tools_get/set_tool_options_gui()
...
Add gimp_tools_get_tool_options_gui() and
gimp_tools_set_tool_options_gui() widgets utility functions.
2010-10-31 13:05:15 +01:00
Alexia Death
8663b22c2a
app: Fixes to brush scale->size replacement
2010-10-30 21:38:54 +03:00
Michael Natterer
ae742f0920
app: some cleanup in the new brush size code
2010-10-30 19:56:24 +02:00
Alexia Death
5d42803d7f
app: Expose brush size in pixels, not as ratio
2010-10-30 19:51:07 +03:00
Michael Natterer
79f0f5639b
Don't use gtk_container_add() for adding to GtkBoxes
...
because the packing options are different for GtkH/VBox and GtkBox
itself which is now instantiable. Instead, always use
gtk_box_pack_start() and specify expanding explicitely.
2010-10-30 14:57:56 +02:00
Alexia Death
e8df164366
app: Add dynamics selector to the tool options
2010-10-27 21:49:24 +03:00
Martin Nordholts
c33b287dab
app: Register GimpToolAction for gimp_enum_get_value_name()
...
Register GimpToolAction so we can use gimp_enum_get_value_name() on
it.
2010-10-26 14:23:08 +02:00
Martin Nordholts
73d2f44210
app: Add some GimpRectangleTool GIMP_LOG() messages
2010-10-26 14:23:08 +02:00
Michael Natterer
400f5ac5f3
app: store adjustments as GtkAdjustment pointers instead of GtkObject ones
...
and get rid of casting them.
2010-10-19 12:28:26 +02:00
Michael Natterer
22db39afd2
app: fix incomplete earlier s/GtkAnchorType/GimpHandleAnchor/ change
2010-10-18 20:13:09 +02:00
Michael Natterer
5b64b83569
app: introduce enum GimpHandleAnchor as replacement for GtkAnchorType
...
because the latter is gone in GTK+ 3.0
2010-10-18 12:50:17 +02:00
Michael Natterer
c36f762f7d
libgimpwidgets: deprecate GimpUnitMenu and gimp_prop_unit_menu_new()
...
Add gimp_prop_unit_combo_box_new() and adapt all places using the
prop_unit_menu. Some things are broken now, like there are no pixel
digits set, resolution unit menus show "pixels" and warn badly when
pixels is selected, and file-pdf-load is not built right now.
More fixes to come...
2010-10-14 23:03:34 +02:00
Michael Natterer
8e0dd56feb
app: fix crashes by not trying to navigate on a NULL layout
...
Add boolean return value to gimp_text_tool_ensure_layout() and check
it where needed. Also fix the new VISUAL_POSITIONS navigation code yet
again.
2010-10-14 11:01:16 +02:00
Michael Natterer
852196eb3d
app: fix insert and overwrite cursors for RTL text
...
by using the right function to figure the location of both kinds of
cursors. Also fix crash in my last cursor movement commit: check for
error values returned by pango_layout_move_cursor_visually() and don't
try to move the cursor beyond the buffer boundaries.
2010-10-14 02:45:32 +02:00
Michael Natterer
0c7ec05035
app: honor text direction when moving the cursor
...
Use pango_layout_move_cursor_visually() instead of e.g. simply using
gtk_text_iter_forward_cursor_position() when "right" was pressed.
This is much more correct now but still not 100% right.
2010-10-14 01:01:33 +02:00
Michael Natterer
11bc11d2f7
app: add back the draw timeout
2010-10-11 22:27:32 +02:00
Michael Natterer
38153d7476
app: gimp_paint_tool_oper_update(): stop/start the draw tool only when needed
2010-10-11 22:26:52 +02:00
Michael Natterer
3de4d7263a
app: Bug 631619 - Drawing artifacts spread by paintbrush outline on canvas
...
Add a transform matrix to GimpCanvasBoundary and get rid of the whole
BoundSeg transform code in boundary.c and gimpbrushcore.c, it was
impossible to get this right on that level. Also fix te extents of
GimpCanvasBoundary os it leaves no artifacts.
2010-10-09 22:00:19 +02:00
Michael Natterer
545e65dda6
app: add gimp_display_shell_selection_pause() and _resume()
...
and use them instead of gimp_display_shell_selection_control() with
the resp. enum values. Remove the GIMP_SELECTION_PAUSE and _RESUME
enums values and thus the presence of this concept in the core.
2010-10-09 14:26:33 +02:00
Michael Natterer
e11ca44ba0
app: use gimp_display_shell_selection_control() in the paint tool
...
not gimp_image_selection_control(). The image dealing with that
is an artifact that is going to die.
2010-10-09 14:07:04 +02:00
Michael Natterer
54a65fa9c3
app: add gimp_draw_tool_add_path() and use it in the vector tool
...
Also clean up gimp_vector_tool_draw() a bit.
2010-10-07 14:10:57 +02:00
Alexia Death
d7492cb528
app: remove forward transform preview from cage tool, reverse is actually faster
2010-10-07 00:41:40 +03:00
Michael Natterer
49f2204a8a
app: add a newline
2010-10-05 09:08:56 +02:00
Michael Natterer
4151d9f693
app: some draw tool cleanup
...
- call undraw() from draw() instead of duplicating its code
- merge clear_items() into undraw()
2010-10-04 23:31:25 +02:00
Sven Neumann
8587e1e920
app/tools: introduce gimp_draw_tool_add_crosshair()
...
gimp_draw_tool_add_crosshair() is a convenience function that
adds two intersecting guide lines in a stroke group.
2010-10-04 22:02:12 +02:00
Sven Neumann
5a3dc38af0
app/tools: draw two guides for the moving sample point
...
Instead of drawing two lines cropped at image borders, use two guides
that extend all across the canvas and also put them into a stroke group.
Also apply a similar fix as in the move tool and don't use -1 but
G_MININT as the invalid sample point position.
2010-10-04 21:40:52 +02:00
Sven Neumann
5e0fbc66a0
app/tools: don't use -1 as invalid guide position
...
Introduce a define for the invalid guide position that is used when
creating a new guide and define it as G_MININT. The value of -1
that used to be used for this caused the moving guide to disappear
at position -1.
2010-10-04 21:22:28 +02:00
Michael Natterer
b693269060
app: simplify creating of stroke and fill groups a lot
...
- add gimp_draw_tool_push_group()/pop_group() which manage a stack
of groups; all items automatically get added to the stack's top group
- use push_group()/pop_group() all over the place, which saves a lot
of code in most cases
- return GimpCanvasGroup not GimpCanvasItem pointers from
gimp_draw_tool_add_stroke_group() and fill_group()
Unrelated:
- add GipmCanvasGroup parameter to gimp_rectangle_tool_draw()
- put rect select's round corners into the stroke group to
avoid ugly overdrawing (the mis-alignment of arcs becomes
very visible now however, will fix that soon)
2010-10-04 14:03:37 +02:00
Michael Natterer
64d9d76722
app: gimp_draw_tool_add_arc() pass the "filled" parameter down to the item
...
instead of always passing FALSE.
2010-10-04 13:58:29 +02:00
Michael Natterer
d88a348c18
app: add public API for the "guide-style" and "sample-point-style" properties
...
of the guide and sample point canvas items. They are too obscure to
additionally hide them, and these items are used rarely enough to
justify the additional parameter to the new() functions.
2010-10-03 22:14:40 +02:00
Martin Nordholts
19bf6ff497
Bug 629926 - some tool sliders are not usable
...
"Aspect Ratio" takes too much horizontal space, shorten to just
"Aspect".
2010-10-03 19:06:24 +02:00
Michael Natterer
f3450431a3
app: add a pen canvas item class and use it in the foreground select tool
...
Remove gimp_display_shell_draw_pen().
2010-10-03 02:26:40 +02:00
Michael Natterer
33ab94517f
app: add gimp_draw_tool_add_stroke_group() and add_fill_group()
...
and use it in all tools which have groups.
2010-10-01 14:24:46 +02:00
Michael Natterer
201bfe3e25
app: add a "shell" property to GimpCanvasItem
...
and pass it to all constructors. The GimpDisplayShell is needed
because items are going to become more powerful soon.
2010-10-01 14:13:45 +02:00
Michael Natterer
26d0035be0
app: draw guides using GimpCanvasItems
...
- Add signals GimpImage::guide_added(), removed() and moved()
- Remove singal GimpImage::update_guide()
- Adapt core code to emit the new signals instead of update_guide()
- Have the shell connect to the new signals and update guide canvas
items as needed
- Remove gimp_display_shell_draw_guides()
2010-10-01 10:34:15 +02:00
Michael Natterer
2ced18cc87
app: add gimp_draw_tool_add_sample_point()
...
and use it in the color tool. Also rename
gimp_draw_tool_add_guide_line() to gimp_draw_tool_add_guide().
2010-09-30 02:03:16 +02:00
Michael Natterer
f5750647c1
app: use a GimpCanvasSamplePoint to draw the hovered sample point
2010-09-30 01:32:34 +02:00
Michael Natterer
50efb96222
app: remove empty GimpTool::control() implementation
2010-09-30 00:40:42 +02:00
Michael Natterer
a8259996e4
app: simplify the drawing code
...
by using gimp_draw_tool_add_guide_line() for the active guide too.
2010-09-30 00:39:15 +02:00
Michael Natterer
d3e2db88bb
app: restart the draw tool after moving a guide
...
so the dropped guide is highlighted. Also don't uselessly stop/start
the draw tool in each oper_update(), only do so when the display
changes.
2010-09-30 00:29:11 +02:00
Michael Natterer
89af8f4143
app: use a GimpCanvasGuide to display the hovered guide
...
And don't call any shell draw functions directly any longer.
2010-09-30 00:18:00 +02:00
Michael Natterer
7edfa2ca54
app: start an infrastructure where the shell keeps around its canvas items
...
- Invalidate the proper area when an item gets added or removed.
- Draw the kept canvas items instead of calling a draw tool function.
- The draw tool now sets its item on the shell.
2010-09-29 22:12:01 +02:00
Sven Neumann
2ef259cd20
app: use GimpRGB as mask color
...
Instead of passing GimpChannelType as mask color to
gimp_display_shell_set_mask(), change that function to accept a
GimpRGB color.
Adapt GimpForegroundSelectTool, the only user of the display mask
feature, to this change.
2010-09-29 20:35:00 +02:00
Michael Natterer
ebeb933350
app: add gimp_display_shell_expose_item() and use it in the draw tool
2010-09-29 20:10:21 +02:00
Michael Natterer
e869e83f56
app: add the text tool's selection rectangles to a filling group
...
Doesn't look any better but is a step in the right direction.
2010-09-27 23:04:18 +02:00
Michael Natterer
3f2641c4be
app: put the bounding box lines into a stroking group
2010-09-27 19:32:25 +02:00
Alexia Death
1a5bacf649
Fix cage tool to work with the draw tool in master
2010-09-26 23:57:45 +03:00
Michael Natterer
06da10bc08
app: change boundary drawing by tools to work like the selection
...
- GimpCanvasBoundary takes unsorted BoundSeg arrays now and uses
gimp_display_shell_transform_boundary() and gimp_cairo_add_boundary().
- Nobody calls boundary_sort() any longer for the purpose of displaying
a boundary.
- gimp_display_shell_transform_boundary() got offset parameters
so it can transform things that are not in the image's coordinate
system.
2010-09-26 22:41:04 +02:00
Michael Natterer
4492725110
app: add some (disabled) code that draws the untransformed brush outline
2010-09-26 22:27:55 +02:00
Alexia Death
74e5864fa6
Merge branch 'master' into soc-2010-cage-2
2010-09-26 23:08:15 +03:00
Michael Natterer
ffd57307c8
app: put the transform tool's grid and boundary into a stroke group
2010-09-26 18:44:40 +02:00
Michael Natterer
6ec1729035
app: add the handle that is being dragged to the stroke group too
2010-09-26 17:13:53 +02:00
Michael Natterer
9cce1b894b
app: put a lot of rectangle tool lines into a stroke groups
...
so they don't overlap.
2010-09-26 16:17:05 +02:00
Michael Natterer
e0f35d8979
app: put the lines and the angle arc into a stroke group
...
This looks much better, and makes the lines appear under the handles
as a nice side effect.
2010-09-26 15:49:10 +02:00
Michael Natterer
a306a46d45
app: make the code that puts the lines into a stroke group nicer
...
This much lesss feels like we need new API, let's see...
2010-09-26 15:43:59 +02:00
Michael Natterer
4b89850a2e
app: draw the free select tool's line in one stroke()
...
This is clearly too complicated for general use, but it's only a test
case for the new APIs.
2010-09-26 14:17:04 +02:00
Michael Natterer
b173707c84
app: add gimp_draw_tool_remove_item()
2010-09-26 14:15:47 +02:00
Michael Natterer
970a062b01
app: argh! never add even only one line of code without testing...
2010-09-26 00:30:09 +02:00
Michael Natterer
b3af235e79
app: rename all gimp_draw_tool_draw_foo() functions
...
to gimp_draw_tool_add_foo() because that's what they do now.
2010-09-25 19:02:22 +02:00
Michael Natterer
5089b9a706
app: remove gimp_draw_tool_in_radius()
...
It was used only once and that code is not less readable when using
gimp_draw_tool_calc_distance_square().
2010-09-25 18:24:38 +02:00
Michael Natterer
dfd5a265eb
app: remove gimp_draw_tool_draw_dashed_line()
...
Instead, draw a normal line and set the "highlight" property on the
returned canvas item.
2010-09-25 18:04:40 +02:00
Michael Natterer
e91dce5f9f
app: remove gimp_draw_tool_draw_arc_by_anchor()
...
Instead, draw a circular handle and set the angles on the returned
canvas item.
2010-09-25 17:59:56 +02:00
Michael Natterer
5cda4393d0
app: return the created item from gimp_draw_tool_draw_foo()
2010-09-25 17:52:56 +02:00
Michael Natterer
02924e1e70
app: change the unit of angles in the draw tool's draw_arc() functions
...
from the weird X 1/64 of a degree to radian.
2010-09-25 17:35:40 +02:00
Michael Natterer
df44ced093
app: keep the draw tool's items around in a GimpCanvasGroup
...
which reduces the number of invalidations on the canvas to one.
2010-09-25 17:20:08 +02:00
Michael Natterer
62f8f559a7
app: add gimp_draw_tool_add_item() and use it all over the place
2010-09-25 11:19:00 +02:00
Michael Natterer
cbaf997ae2
app: undraw the old canvas items only before drawing new ones
...
or when the draw tool is really stopped. This seems to get rid of any
remaining flickering and also reduces expose events. Also get rid of
the "is_drawn" state and API because they make no sense any longer.
2010-09-24 23:25:19 +02:00
Michael Natterer
5d14e9befc
app: move clearing and invalidating canvas items to utility functions
2010-09-24 21:25:01 +02:00
Michael Natterer
7a6a57c42f
app: remove code in draw() that special cases drawing vs. undrawing
...
GimpDrawTool::draw() is not used for undrawing any longer.
2010-09-24 21:18:45 +02:00
Michael Natterer
313f8bee1e
app: remove "gboolean use_cairo" from the draw tool again
...
It's always TRUE now.
2010-09-24 21:14:49 +02:00
Michael Natterer
21adcb22e1
app: port the region select tool to gimp_draw_tool_draw_boundary()
...
instead of drawing cached segments directly. This is a massive
performance regression, will have to optinmize boundary drawing
some other way.
2010-09-24 20:58:22 +02:00
Michael Natterer
a5c961ae6f
app: remove the last traces of gimp_canvas_draw_foo() from the draw tool
2010-09-24 20:40:02 +02:00
Michael Natterer
9154814b94
app: enable cairo drawing for the text tool
...
This looks absolutely unacceptable if there is a selection, will
fix that later with a special text selection item or a special
style.
2010-09-24 20:35:59 +02:00
Michael Natterer
957acb42e8
app: add support for cairo text cursor drawing
2010-09-24 20:35:14 +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
9cb4a2e87b
app: enable cairo drawing for the align tool
2010-09-24 18:59:05 +02:00
Michael Natterer
926bbc6658
app: enable cairo drawing for the rect and ellipse select tools
...
and draw the rectangle's round corners under the bounding box.
2010-09-24 18:43:09 +02:00
Michael Natterer
67708a65a1
app: add support for cairo arcs
2010-09-24 18:42:36 +02:00
Michael Natterer
db1da1ed64
app: handle sizes should be odd numbers
2010-09-24 13:13:53 +02:00
Michael Natterer
398742b3ac
app: draw the grid under the bounding box
2010-09-24 13:13:33 +02:00
Michael Natterer
b5194b65c5
app: handle sizes should be odd numbers
2010-09-24 13:13:02 +02:00
Michael Natterer
75c11e259d
app: fix off-by-one in rectangle tool guides
...
and draw the guides below the rectangle.
2010-09-24 11:21:07 +02:00
Michael Natterer
4a5d3301ad
app: enable cairo drawing for the crop tool
2010-09-24 10:51:10 +02:00
Michael Natterer
6fb802f77b
app: add draw tool support for cairo corners
2010-09-24 10:50:44 +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
3afd2da690
app: enable cairo drawing for the measure tool
2010-09-24 01:33:15 +02:00
Michael Natterer
1c550d4623
app: suppose arc slices
2010-09-24 01:32:57 +02:00
Michael Natterer
590e63f658
app: enable cairo drawing for all transform tools
2010-09-23 23:52:32 +02:00
Michael Natterer
a75b298946
app: enable cairo drawing for the edit selection tool
2010-09-23 23:47:20 +02:00
Michael Natterer
3b4d26e8d2
app: enable cairo drawing for all paint tools
2010-09-23 23:39:36 +02:00
Michael Natterer
ecd59cd013
app: add cairo support to boundary drawing
2010-09-23 23:39:16 +02:00
Michael Natterer
2c0520281d
app: reorder code in draw() so handles are on top of lines
2010-09-23 19:47:14 +02:00
Michael Natterer
39a4dfb923
app: enable cairo drawing for the vector tool
2010-09-23 19:26:29 +02:00
Michael Natterer
db1a85148e
app: use the highlight color for "dashed" lines, oh well...
2010-09-23 19:26:02 +02:00
Michael Natterer
fb68e40214
app: draw the line before the handles so it will look ok with cairo
2010-09-23 19:24:32 +02:00
Michael Natterer
76be01d026
app: enable cairo drawing for the move tool
2010-09-23 19:24:26 +02:00
Michael Natterer
fe5e989af6
app: add support for drawing guide lines with cairo
2010-09-23 19:24:21 +02:00
Michael Natterer
ddc63de6d6
app: remove "gboolean use_offsets" from gimpdisplayshell-transform.[ch]
2010-09-23 19:24:04 +02:00
Michael Natterer
a0cb4fe805
app: add boundary_offset() which offsets BoundSegs in place
...
and use it in gimp_region_select_tool_calculate().
Also fix boundary_transform() indentation.
2010-09-23 19:23:58 +02:00
Michael Natterer
4d0c750327
app: get rid of "gboolean use_offsets" in the draw tool
...
and always pass image coordinates. Transform the coords manually in
the very few places which passed TRUE.
2010-09-23 19:23:27 +02:00
Michael Natterer
517e77b707
app: keep GimpColorTool->center_x and _y around in image coords
2010-09-23 01:04:22 +02:00
Michael Natterer
7c82f3dc09
app: add gimp_canvas_polygon_new_from_coords()
...
and use it from gimp_draw_tool_draw_strokes().
2010-09-23 00:40:32 +02:00
Michael Natterer
eeeea7c69b
app: enable cairo drawing for the iscissors tool
2010-09-23 00:30:09 +02:00
Michael Natterer
f9a7bea24a
app: enable cairo drawing in the free select tool
2010-09-23 00:00:57 +02:00
Michael Natterer
83bab2f0cd
app: add support for cairo polygons
2010-09-23 00:00:57 +02:00
Michael Natterer
721fae71fb
app: enable cairo drawing for the color picker tool
2010-09-22 22:45:17 +02:00
Michael Natterer
e7de19ed2f
app: remove debug spew in the draw tool
2010-09-22 22:26:41 +02:00
Michael Natterer
919b3d83b8
app: enable cairo drawing in the blend tool
...
and reorder drawing functions so the handles are on top of the line.
2010-09-22 22:25:37 +02:00
Michael Natterer
55369b5f22
app: enable cairo drawing in the zoom tool
2010-09-22 22:25:09 +02:00
Michael Natterer
683e097d89
app: add cairo drawing support in GimpDrawTool
...
- add boolean "use_cairo" toggle to enable it per tool
- split draw() in draw() and undraw() and add cairo variants of drawing
- create canvas items in draw_line(), draw_handle() and draw_rectangle()
- some related changes
2010-09-22 22:19:28 +02:00
Michael Natterer
5722345cc7
app: remove prototype for non-existing gimp_draw_tool_set_transform()
2010-09-22 21:02:38 +02:00
Michael Natterer
24654e0df3
app: remove the draw timeout from GimpDrawTool
...
This slows down painting again, but it's in the way of refactoring so
the slowdown is temporary.
2010-09-22 15:31:17 +02:00
Michael Natterer
69da253e51
app: move enum GimpHandleType to display-enums.h
2010-09-20 19:26:34 +02:00
Michael Natterer
0c1073460c
app: get rid of some public draw tool API
...
and use gimp_draw_tool_draw_handle() instead which does exactly the
same for these cases.
2010-09-20 00:13:32 +02:00
Michael Natterer
7e28f52dd7
app: remove unused clipping functions in GimpDrawTool and GimpCanvas
2010-09-19 18:58:23 +02:00
Simon Budig
4e3775b7c5
app: another rounding fix, style cleanups.
2010-09-17 22:27:28 +02:00
Simon Budig
610b6a23e2
app: properly round the bounding box in the move tool
2010-09-17 21:59:51 +02:00
Sven Neumann
72b25fd355
app: let the vectors tool draw vectors the old way again
...
Seems like the best solution until tool drawing is ported to cairo.
2010-09-16 23:09:14 +02:00
Sven Neumann
5ab83e72ac
app: don't let the vectors tool draw the active vectors
...
Let the display shell deal with drawing the vectors. The vectors
tool only draws the handles on the active vectors object.
2010-09-16 21:13:08 +02:00
Michael Natterer
095ae5cc9b
app: move mask_bounds() and mask_intersect() from GimpDrawable to GimpItem
...
There is nothing drawable-specific in there, and having them on
GimpItem enables some simplifications, esp. in upcoming PDB
wrappers. None of these refactorings is in this commit though.
2010-09-07 21:30:46 +02:00
Sven Neumann
178aa9c6dc
app/tools: fix alternative button order
2010-09-07 20:39:45 +02:00
Alexia Death
e133035440
Fix point selection detection
2010-09-05 13:33:26 +03:00
Alexia Death
d261248792
Clean up debug code
2010-09-05 12:48:23 +03:00
Alexia Death
55b0c9f08e
Some generic method sorting and cleanup in the tool
2010-09-02 22:28:06 +03:00
Alexia Death
6ecb219c4f
Fix a preview update related segfault
2010-09-02 20:11:34 +03:00
Alexia Death
6dc2042fe2
app: cage tool adjustments and fixes
...
Just show the complete preview and take the fill color from under first point.
2010-08-30 23:36:20 +03:00
Alexia Death
aee148a486
Merge branch 'master' into soc-2010-cage-2
2010-08-26 21:50:55 +03:00
Michael Natterer
cd192adf09
app: undo some of the previous refactorings and keep using GdkSegment
...
It's not going to be deprecated, so there is no harm in using it; get
rid of all the added _old() functions too.
2010-08-25 21:21:16 +02:00
Michael Natterer
3127d36216
app: rename gimp_display_shell_transform_segments()
...
to gimp_display_shell_transform_segments_old() as step one
of porting selection drawing to cairo.
2010-08-25 01:37:19 +02:00
Michael Natterer
18d3882c5c
app: port GimpDisplayShell pen drawing to cairo
2010-08-23 21:59:27 +02:00
Martin Nordholts
92d0b22653
app: Fix translation, "region_select" => "selection"
2010-08-17 19:08:33 +02:00
Martin Nordholts
876e99fdd0
app: Rectangle tool: Allow 'size' separators in 'aspect' and vice versa
...
In the Rectangle tool options, allow 'Fixed: Size' separators in
'Fixed: Aspect ratio' and vice versa, no point in being strict.
2010-08-16 22:00:06 +02:00
Michael Muré
f44dcf26b3
fill the original cage position with a plain color + UI
2010-08-15 14:20:47 +02:00
Alexia Death
28cfa9d3df
tools: Fix some warnings I introduced into cage tool earlyer
2010-08-15 02:58:31 +03:00
Alexia Death
f037300658
tools: Many cage tool fixes.
...
Adds idle function to update the projection while imagemap is rendering.
2010-08-15 02:32:31 +03:00
Michael Muré
6c36d7ac13
gimpcagetool: add preview
2010-08-13 18:25:48 +02:00
Michael Muré
c29396a0c2
GimpCageTool: add code in #if #else #endif to test the forward transform
2010-08-12 14:38:21 +02:00
Michael Muré
3d79167074
change name of gimp cage gegl op to gimp internal op.
2010-08-12 13:47:31 +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 Muré
fe9f1f4a01
GimpCageTool: better memory gestion in different handle
...
+ code to render/debug coefficient, in #if #else #endif
+ cleaning / coding style
2010-08-11 20:27:32 +02:00
Michael Muré
67c1981a40
GimpCageTool: don't allow to add handle after closing the cage
2010-08-10 00:58:24 +02:00
Michael Muré
34b40a6c7e
solve the problem result cropped to the bounding box of the cage
2010-08-09 23:33:11 +02:00
Michael Muré
19b81bb097
gimpcagetool: fix buffer leak
2010-08-08 18:21:26 +02:00
Michael Muré
459414c9dc
gimpcagetool: use cage_transform and gegl_render_mapping to do the transform
...
gimpoperationcage: cleaning
gimpcageconfig: cleaning
2010-08-08 13:27:20 +02:00
Michael Muré
9677eeeffc
gimpcagetool: add a warning if the coef buffer isn't initialised
2010-08-08 13:27:11 +02:00
Michael Muré
8c33eb83f7
gimpcagetool, gimpoperationcage: now the forward transform work as
...
expected
2010-08-08 13:27:02 +02:00
Michael Muré
3c5c65ea3c
gimpcagetool: use GimpCageConfig, and apply gegl op. Doesn't work yet.
2010-08-08 13:26:52 +02:00
Michael Muré
c686093b38
make GimpCageOptions to use the new enum for Cage mode
2010-08-08 13:25:10 +02:00
Michael Muré
066bbb80f4
gimpcagetool: flush the image correctly after applying a cage deform
2010-08-08 13:24:39 +02:00
Michael Muré
e141953d35
gimpcagetool: the cage can be closed only if the number of point is 3 or more
2010-08-08 13:24:29 +02:00
Michael Muré
98ff627955
gimpcagetool: fix a missing include and a function declaration
2010-08-08 13:24:16 +02:00
Michael Muré
fcd156014a
gimpcagetool: beginning of the link tool/gegl op
2010-08-08 13:24:06 +02:00
Michael Muré
db5981a69c
gimpcagetool: draw/edit cage, accordingly to cage mode
2010-08-08 13:22:56 +02:00
Michael Muré
d836615ae7
gimpcagetool: now inherit from GimpDrawTool. Moving cage point also works.
2010-08-08 13:22:44 +02:00
Michael Muré
ad0a81c528
gimpoperationcage: iterate accordingly to cage's bounding box.
...
pre-copy the input buffer to the output.
2010-08-08 13:22:34 +02:00
Michael Muré
2157a67cea
app/core/gimpcage: add access functions to the cage data structure (add a vertice, remove the last, move a vertice, check if a point is near a vertice)
...
app/tools/gimpcagetool: The tool can now draw a cage, add vertices, remove the last, close the cage
2010-08-08 13:20:24 +02:00
Michael Muré
6a387f7db0
Enhancement of the CageOptions object to allow the selection of the mode (creation or transform of the cage) + basic gui
2010-08-08 13:19:45 +02:00
Michael Muré
f6316285be
structure of the cage tool, with an options object
2010-08-08 13:17:10 +02:00
Michael Muré
24652b4fbd
empty gobject for GimpCage (data structure), GimpOperationCage (Gegl op) and GimpCageTool (frontend)
2010-08-08 13:16:57 +02:00
Barak Itkin
5a9f2f1eac
app: Add '/' as a seperator for the rectangle tools options (in the Fixed field)
2010-07-23 19:17:12 +03:00
Michael Natterer
3184c440b3
app: introduce GimpItem::to_selection()
...
Which replaces all the deparate functions to turn layers, channels,
layer masks and vectors into selections. Use the new virtual function
all over the place instead of calling the functions in
gimpchannel-select.c manually.
2010-07-20 23:09:19 +02:00
Mukund Sivaraman
597b255262
Update Desaturate tool's status text
...
The existing text is poor English and is confusing.
2010-07-05 19:27:44 +05:30
Michael Natterer
c448cc7d25
app: really really destroy the tool options widgets this time
2010-06-24 18:38:19 +02:00
Nelson A. de Oliveira
c4588f1209
Bug 575911 - Add 'Rule of fifths' crop guide overlay
...
Implement a rule of fifths guideline for GIMP. See
http://markhancock.blogspot.com/2006/03/address-basic-composition.html
for more info.
2010-06-24 08:37:09 +02:00
Michael Natterer
bbd4038e98
app: make sure all tool options widgets are properly destroyed
...
...and with them all references their widgets keep (which are a lot).
Take ownership of the widget after creating it, so it can be reliably
unrefed upon exit.
2010-06-23 22:48:53 +02:00
Michael Natterer
94e757df51
app: don't leak options->language; add finalize() to free it
2010-06-22 23:06:35 +02:00
Michael Natterer
170f0bed00
app: use a GimpOverlayFrame for the text style editor
...
so it gets round corners and doesn't look so old school.
2010-06-12 23:49:55 +02:00
Michael Natterer
434bfbd6fa
app: rename GimpToolOverlay to GimpOverlayDialog
...
because it's only used by tools currently, but not related to them in
any way.
2010-06-03 22:32:30 +02:00
Michael Natterer
a3b93151aa
app: some #if 0'ed testing code I occasionally need for debugging
...
(so I don't have to constantly add/remove it, will get rid of it
before 2.8)
2010-06-03 22:16:08 +02:00
Michael Natterer
02b8eea086
app: restrict sample point drawing to the exposed region
...
With the same limitation as for guides in the last commit.
2010-05-02 15:58:51 +02:00
Michael Natterer
6e4be79bef
app: restrict grid and guide drawing to the exposed region
...
Doesn't really clip yet for guide drawing, but at least doesn't bother
to draw them when they are outside the expose region's bounding box.
2010-05-02 15:40:11 +02:00
Alexia Death
06c1b290d0
app: Add tool preset editor to controll what elements get applied
...
I had to remove the asserrt in tool preset constructor, because with it
it wasnt possible to initalize an empty model object for the editor.
At init time the gimp object passed to the constructor is not yet available.
2010-04-24 17:55:54 +03:00
Michael Natterer
8d3a5099f8
app: turn a g_warning() into a g_return_if_fail()
2010-04-22 17:17:02 +02:00
Michael Natterer
5b28d04674
app: queue the draw timeout only if paused_count reaches zero
2010-04-22 17:15:08 +02:00
Michael Natterer
2f5d2bc85f
Bug 616342 - gimp crashes on startup if you have a contextrc file from 2.6
...
Remove the draw timeout in GObject::dispose() to be safe.
2010-04-22 16:45:44 +02:00
Michael Natterer
56e4585f70
app: finally apply tool presets when one is seleced
...
currently respects the fact that FG/BG are always global and the
global brush,pattern,... settings from gimprc. This should probably
not change, but rather be overridable on a per-preset basis as
suggested.
2010-04-21 20:56:49 +02:00
Michael Natterer
94181ce538
app: don't overwrite all tool options' "tool" and "paint-info"
...
with bogus values from contextrc, we want them to always match the
tool option's type.
2010-04-21 20:43:27 +02:00
Michael Natterer
d47aa2ba52
app: change to the preset's tool when a tool preset is selected
...
but don't set any tool options yet because that is a lot more tricky.
2010-04-20 20:11:37 +02:00