Commit Graph

121 Commits

Author SHA1 Message Date
Michael Natterer 6fdcc5f465 app: add a progress indicator for cage transform
- add a double "progress" property to GimpOperationCageTransform
  and update it every 20 rows
- connect to the notify::progress in the tool and display a tool
  progress
2011-03-25 15:41:53 +01:00
Michael Natterer 41b905baa8 app: make GimpTool implement the GimpProgress interface properly
and remove the previously added quick hack. Change the cage progress
code to standard progress code, and use the tool progress also in
blend.
2011-03-25 10:55:07 +01:00
Michael Natterer 8daee72518 app: various GimpCageTool fixes
- completely halt the tool before starting it
- bail out on options changes when the tool is not active
- initialy set the mode to CAGE_CHANGE
- indentation, formatting, various small cleanups
2011-03-25 10:18:56 +01:00
Michael Natterer e9dd30127a app: add an on-canvas progress facility to GimpTool
and use it in GimpCageTool.
2011-03-25 09:48:26 +01:00
Michael Natterer 1659f62e2c app: small style cleanup in the merged cage code 2011-03-23 22:29:00 +01:00
Michael Muré 7056d38681 cagetool: implement rubber band selection for edit mode, if the cage is closed 2011-01-22 15:38:35 +01:00
Michael Muré aa98319f1b cage tool: implement options_notify to allow switching back to edit mode
and update fill option
2011-01-22 14:17:28 +01:00
Michael Muré 3f581c37b6 cagetool: fix a drawing bug when adding point to the cage while moving cursor 2011-01-22 14:17:28 +01:00
Michael Muré f379f3c467 fix rubber band selection for layer with offset 2011-01-22 14:17:28 +01:00
Michael Muré e7d219d387 Cage tool: add rubber band selection for deform mode 2011-01-22 14:17:28 +01:00
Michael Muré dd28e1fe02 Implementation of the multi-selection in the cage tool and refactoring that come with.
This editing mode should work like the path tool.
The backup of the cages point for undo is replaced by a displacement that affect
all the selected point in CageConfig with commit/reset displacement.
2011-01-22 14:17:28 +01:00
Michael Muré 006c7ab9f4 refactor of the GimpCageConfig with a custom GimpCagePoint data structure 2011-01-22 14:17:28 +01:00
Michael Muré 23193cba2f Rewrite of the cage tool as a state machine 2011-01-22 14:17:28 +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
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
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 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 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
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
Alexia Death f09f6dae06 app: Make cage tool work with gegl master 2010-11-02 20:56:53 +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
Alexia Death 1a5bacf649 Fix cage tool to work with the draw tool in master 2010-09-26 23:57:45 +03: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
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 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é 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