Commit Graph

29257 Commits

Author SHA1 Message Date
Michael Natterer e03a25caeb app: add virtual function gboolean GimpCanvasItem::hit()
and implement it for GimpCanvasHandle and GimpCanvasGroup.
2011-03-28 18:54:02 +02:00
Michael Natterer b529d556fa app: add and use more GimpCanvasItem setters 2011-03-28 15:15:43 +02:00
Michael Natterer d96091d514 app: port GimpMagnifyTool away from draw_tool_pause()/resume() 2011-03-28 12:22:29 +02:00
Michael Natterer accc12a3ca app: change GimpCanvasItem setters to take GimpCanvasItem*
not GimpCanvasLine* etc. We keep them around as items, and their
constructors return items, and it's getting more code anyway when
porting away from pause/resume, so let's keep the casting minimal at
least.
2011-03-28 12:20:36 +02:00
Michael Natterer aa5d2f8082 app: port GimpBlendTool to pause()/resume()-less drawing
Instead, keep around the created GimpCanvasItems, and update them when
the blend coordiates change. Add setters to GipmCanvasLine and
GimpCanvasHandle which take care of calling begin_change() and
end_change() on the items around the change, so thes invalidate
properly.
2011-03-28 11:08:40 +02:00
Michael Natterer 1c0fe73da4 app: gimp_transform_tool_draw(): initialize the array of handles to NULL
And update/improve some comments in the entire file.
2011-03-28 10:16:00 +02:00
Michael Natterer 20bed2c609 app: add gimp_draw_tool_add_transform_preview() and use it 2011-03-28 02:18:00 +02:00
Michael Natterer fd80b90cf0 app: more minor GimpTransformTool cleanup 2011-03-28 02:10:33 +02:00
Michael Natterer 9f6b60c29d app: draw the perspective clone handles only when they can be used 2011-03-28 01:27:02 +02:00
Michael Natterer 4097825f3c app: some more code removal and cleanup in the transform classes 2011-03-28 01:20:47 +02:00
Michael Natterer dde7d6c0ee app: remove lots of junk from GimpPerspectiveCloneTool
This is an evil transform tool copy, so do the same changes here.
2011-03-28 01:20:47 +02:00
Rudolfs Mazurs 707c5e961a Updated Latvian translation. 2011-03-28 02:06:15 +03:00
Rudolfs Mazurs a7c4e00d3c Updated Latvian translation. 2011-03-28 02:04:38 +03:00
Michael Natterer babc2186c5 app: move the enum of indexes into the trans_info array to the .c files
and turn #defines from 0 to N into enums.
2011-03-28 00:50:46 +02:00
Michael Natterer 06e0183f96 app: right-align the perspective matrix labels with the right API
Use gtk_misc_set_alignment() instead of gtk_label_set_justify().
2011-03-28 00:39:39 +02:00
Michael Natterer d36887644d app: highlight the active transform tool handle 2011-03-28 00:13:14 +02:00
Michael Natterer 32f240fa4a app: prepare GimpTransformTool for highlighting the handles 2011-03-27 23:57:12 +02:00
Michael Natterer 18929f0865 app: lay out the GimpTransformOptions GUI more uniformly 2011-03-27 23:18:28 +02:00
Michael Natterer 8512675088 app: rename GimpTransformTool::recalc() to ::recalc_matrix() 2011-03-27 23:12:11 +02:00
Michael Natterer fb2ba3f289 app: remove display parameters from all virtual GimpTransformTool functions 2011-03-27 22:39:31 +02:00
Michael Natterer eb4f01039a app: add utility function gimp_transform_polygon_is_convex()
and use it in GimpTransformTool and GimpCanvasTransformPreview.
2011-03-27 22:04:33 +02:00
Michael Natterer caa8cdd4c1 app: add gimp_transform_options_show_preview()
which returns whether or not to show a transform preview. Also clean
up gimp_transform_tool_draw() a bit and add a stroke group for the
center handle.
2011-03-27 21:49:34 +02:00
Michael Natterer 8a09fd1f34 app: refactor GimpCanvasTransformPreview to not know GimpTransformTool any more
Instead, add drawable, transform, x1, y1 etc. properties. This is
cleaner and has the nice side effect of not leaving artifacts, because
the changed state of the transform tool doesn't affect the extents
calculation any longer.
2011-03-27 21:19:38 +02:00
Michael Natterer 1e11a279b2 libgimpmath: add a boxed type and a GParamSpec for GimpMatrix3 2011-03-27 21:13:31 +02:00
Michael Natterer 6fe9430cab app: remove members "type" and "direction" from GimpTransformTool
and use the stuff from GimpTransformOptions directly. The copied
values were only there because of XOR drawing. Also did some more
cleanup and junk removal.
2011-03-27 17:38:49 +02:00
Michael Natterer 1d9f95ac98 app: code cleanup and streamlining in GimpCanvasTransformPreview 2011-03-27 16:54:21 +02:00
Michael Natterer 92aeeadecf app: remove unused macros from gimpdrawable-transform.c 2011-03-27 16:53:48 +02:00
Michael Natterer f09be52c1b app: turn the transform preview into a GimpCanvasItem
And remove all the complicated handling code entirely. This makes
GimpTransformTool a lot less complex. As a nice side effect, the
preview is now always 100% in sync with the grid and handles.
2011-03-27 16:40:41 +02:00
Mukund Sivaraman 4d9952cf54 Add extra optimization flags for super performance 2011-03-27 04:15:09 +05:30
Michael Natterer cf28e07b64 app: move enum TransformAction from tools-enums.h to gimptransformtool.h
Moving it to tools-enums.h was a mistake, it's actually supposed to be
a private enum, accessible only by subclasses. And it's ugly.
2011-03-26 22:32:35 +01:00
Michael Natterer f632c4a8aa app: transform the transform grid lines on the fly
which is much less code than keeping the transformed lines around.
2011-03-26 22:14:07 +01:00
Michael Natterer 74f276fe4f app: make sure GimpTransformTool draws correctly after options changes 2011-03-26 21:53:06 +01:00
Michael Natterer deafe3d341 app: remove some entirely useless members from GimpTransformTool 2011-03-26 20:40:35 +01:00
Michael Natterer 6c524ea1db app: GimpSessionInfo: use brute force to position dialogs
Window managers are such a crap. So on top of all friendly hinting and
geometry setting, simply use gtk_window_move() whenever a session
managed GtkDialog is shown. It should be very hard to ignore that, but
of course the WM has the last word no matter how hard we try.

Note: this code should be more complex and the signal connection
should happen in GimpDialogFactory. Left it in GimpSessionInfo for now
until it got a bit of testing.
2011-03-26 19:47:44 +01:00
Michael Natterer c629cbeb89 app: some formatting cleanup in GimpDialogFactory 2011-03-26 19:32:59 +01:00
Michael Natterer 6606d10be1 app: gimp_transform_tool_transform(): don't unref NULL orig_tiles 2011-03-26 18:57:31 +01:00
Michael Natterer ae72971866 app: pass the orig_tiles and their offset to GimpTransformTool::transform()
instead of keeping them around as members. This is another artifact
from ancient times. Also get rid of some more legacy junk
code. Disable more code in GimpTransformToolUndo but keep it around
even though it does nothing at the moment.
2011-03-26 18:45:58 +01:00
Michael Natterer 88ee23aa29 app: move some of the new tile offset variables to local scopes 2011-03-26 18:37:34 +01:00
Michael Natterer 047d31fa68 app: gimp_drawable_transform: place new the tiles at offset_x, offset_y
and not at offset_y, offset_y (typo).
2011-03-26 16:50:38 +01:00
Mukund Sivaraman 647f0ada2a Add support for reading 16-bit raw PPM files
This should be useful for loading the output of programs such
as dcraw.
2011-03-26 15:09:59 +05:30
Michael Natterer bc8d5f84d6 app: remove the "offset" API from TileManager
It made the transform code hard to read and never belonged into the
tile manager anyway. It's a simple pixel buffer that should not know
about any position in an image. Instead, pass around the offsets of
tile managers explicitly, so everything is less obscure for the price
of having more parameters. This will also help replacing TileManagers
with GeglBuffers.
2011-03-26 08:30:15 +01:00
Mukund Sivaraman 41ab7d8e10 Remove broken include 2011-03-26 10:55:21 +05:30
Michael Natterer 6ec5190da2 app: remove unused files base/tile-manager-crop.[ch] 2011-03-26 00:10:19 +01:00
Michael Natterer 9424d42d36 pdb: apply recent fixes to the deprecated transform procedures
Don't transform the tiles of group layers, use the item transform API
instead. Go the same code path if there is no selection.
2011-03-25 22:35:46 +01:00
Michael Natterer 1a359a138d pdb: don't recommend deprecated replacement procedures for deprecated procedures 2011-03-25 22:03:14 +01:00
Michael Natterer 4d7dbe233d pdb: do the same optimization as in the transform tool in the commit below 2011-03-25 21:57:56 +01:00
Michael Natterer 3ed87015a6 app: if there is no selection, don't cut/transform/paste in the transform tool
instead, take the easy path that simply calls gimp_item_transform()
and does exactly the same, just less weird.
2011-03-25 21:50:58 +01:00
Michael Natterer bef6d5716a app: use a tool progress for GimpTransformTool 2011-03-25 21:35:19 +01:00
Michael Natterer f078a7416c app: remove some junk from GimpTransformTool
which was there for the purpose of transfomring the same buffer
multiple times (which would be nice but is broken and disabled for
ages). Also remove some junk that was there for unknown reasons, this
tool has a long history.
2011-03-25 21:32:08 +01:00
Michael Natterer a5549ece52 app: don't pause/resume the shell (and the active tool) around expose()
This was only there to make sure XOR drawing works, and is now
complete overhead since cairo drawing is done *in* expose, and not in
some hack around it.
2011-03-25 21:28:21 +01:00