Commit Graph

3505 Commits

Author SHA1 Message Date
7a4ac0802c Implement GimpItem::resize()
Resize all children, but only crop them (don't enlarge them, unlike
when resizing normal layers).
2009-08-25 17:29:29 +02:00
764af4879e Revert almost all item tree related changed in this file
Don't recursively duplicate all items. Instead, just duplicate the
items in the toplevel image containers, because group items duplicate
their children correctly all by themselves.
2009-08-25 16:25:26 +02:00
d873372262 Don't spoil the names of duplicated groups' children with "copy"s 2009-08-25 16:05:39 +02:00
6fa6aa2686 Filter out linked children of linked items to transform 2009-08-25 15:55:30 +02:00
86a76d6237 Skip group layers when transforming the entire image
Group layers update themselves when their children change, so simply
skip them when cropping, flipping, resizing, rotating or scaling the
image.
2009-08-25 15:46:53 +02:00
cb1e3afba4 Add gimp_image_item_list_filter()
New function takes a GList of items as returned by
gimp_image_item_list_get_list() and can filter out items that:

- have lock_content set to TRUE.
- are children of items that are also in the list (to avoid
  transforming group items *and* their children, because
  the group items already do that for us).
2009-08-25 15:36:03 +02:00
bdf01c6495 Fix gimp_group_layer_scale() to do the right thing
Scale all children in relation to the group layer's old and new size
and offset. The group itself will follow the childrens' sizes.
2009-08-25 14:26:26 +02:00
62c5b23aaf Add naive and wrong version of GimpItem::convert()
That code will fail badly when dropping layer groups between images of
different types, but will at least work between two RGB images.
2009-08-25 14:23:42 +02:00
71134c7f7d gimp_group_layer_duplicate(): insert children in the right order 2009-08-25 12:11:44 +02:00
6934a0d2eb Make sure all group layers' projections switch to GEGL with the main projection 2009-08-24 22:38:16 +02:00
1403db11ef Fix the layer-offset of the group layer's projection graph
Insert a gegl:translate node into the group layer's projection
graph. Produces identical results as the legacy projection now, but is
not yet switched on by checking View->Use Gegl.
2009-08-24 22:01:16 +02:00
9fd204977d Implement GimpItem's transform methods
Add implementations for GimpItem::translate(), scale(), resize(),
flip(), rotate() and transform(). Simply transform all children, the
group layer will automatically update itself. Also transform the layer
mask.
2009-08-24 19:33:29 +02:00
c8c6d77c35 Fix finalize() so it doesn't crash 2009-08-24 17:30:41 +02:00
4fa06d0405 Add a projection to GimpGroupLayer so we finally have a *visible* layer tree
Implement the GimpProjectable interface and keep a GimpProjection
around that projects the GimpDrawableStack of our children. Propagate
the childrens' "update" signals to our own "update" signal so our
parent projection picks up all changes.
2009-08-24 16:05:39 +02:00
dd8a7740ab Honor the projectable's offset in the projection
Add/Subtract the projectable's offset whenever we go from coordinates
from our public interface (which are always image coordinates) and
coordinates in out internal tile pyramid (wihch always starts at 0,0).

The Gegl projection still needs an offset node that is missing.

Also, connect to the projectable's "update" signal using
g_signal_connect_closure_by_id() instead of simply g_signal_connect(),
so we really connect to the signal of the GimpProjectable interface
and not to the "update" signal of GimpDrawable (which is a conflict
that will happen on group layers).
2009-08-24 16:05:38 +02:00
0f668e411e Add an offset API to the GimpProjectable interface
Add GimpProjectable::get_offset() and gimp_projectable_get_offset()
which returns the offset of the projectable in image coordinates, so
we can have projections that act as a viewport onto things that live
in image coordinates.
2009-08-24 16:05:38 +02:00
a451eb950c Use gimp_item_stack_get_item_iter() 2009-08-24 16:05:38 +02:00
ffe1359d84 Add gimp_item_stach_get_item_iter()
Simply an accessor for GIMP_LIST (stack)->list.
2009-08-24 16:05:37 +02:00
2ec53512c5 Change local variable names from "layer" to "group" 2009-08-24 16:05:37 +02:00
a136d86c54 Automatically adjust the size of group layers
Connect to size and offset of all children and resize/move the
group layer accordingly.
2009-08-23 23:00:32 +02:00
819abf2fa0 Override the "lock-content" property to default to TRUE 2009-08-23 20:02:36 +02:00
922375ceca g_return_if_fail() on attempts to set locks that can't be changed 2009-08-23 19:54:19 +02:00
d52d7e77b3 Add API to determine whether "lock" properties can ba changed
Add gimp_item_can_lock_content() and gimp_layer_can_lock_alpha() which
return TRUE unless the item is a grop (has children), because group
items will be considered to have lock_content always TRUE and
lock_alpha always FALSE.
2009-08-23 18:44:05 +02:00
287f9ab887 Adjust UI code to make check button. 2009-08-23 11:56:03 -03:00
d2143b8886 Merging master to current state 2009-08-21 19:26:05 +03:00
0953146be1 Check if there is an active layer if active_layer_only is TRUE 2009-08-20 22:41:49 +02:00
db8aa6cb21 Make dynamics object have an effect on the paintpbrush. Currently pressure and velocity only. 2009-08-20 22:46:17 +03:00
b5c3e5a6b6 Also copy "lock_content" when duplicating an item 2009-08-20 19:34:30 +02:00
e04a7617d5 Cleaning up the dynamics init a little bit more 2009-08-20 18:24:50 +03:00
4af5324d58 Cleaning up the dynamics init a little bit 2009-08-20 15:53:40 +03:00
455e5239cb Adding the sub files for dynamics save and load 2009-08-20 12:34:45 +03:00
569a64d2c9 Created stubs for saving and loading dynamics 2009-08-20 12:26:02 +03:00
93f8216881 Renaming GimpDynamicsOptions to GimpDynamics and moving from paint/ to core/. A BIG change. 2009-08-20 04:25:26 +03:00
9fa9f41106 Taking out unimplemented gimp_dynamics_load for now 2009-08-20 03:25:14 +03:00
460bf0ecdd Fixing some more props errors in context 2009-08-20 03:20:17 +03:00
17a377a553 Fixing props errors in context 2009-08-20 02:31:59 +03:00
fb1a672546 Bug 61019 - add a 'lock' flag per layer to protect it
Took patch from Martin Nordholts and ported it to add a "lock-content"
property, signal and API in the same way as it's done for "visible"
and "linked".
2009-08-19 21:30:48 +02:00
f7ba1d1f2e Add missing blank line after the vectors group of functions 2009-08-19 21:30:47 +02:00
7f94f3213b Pack boolean members into a bitfield to save two integers per item 2009-08-19 21:30:47 +02:00
822e394981 Fix seg fault for gimpcontext 2009-08-19 13:29:06 -03:00
d655f03607 correct a comment 2009-08-19 16:59:15 +02:00
6aa4d55315 Solve errors in gimpcontext for dynamics. 2009-08-18 22:38:45 -03:00
f48a7e4a8b Add dynamics context and factory data and functions (need debugging). 2009-08-17 23:47:26 -03:00
966b81992b app: Add "FG to BG (Hardedge)" gradient
Add internal gradient "FG to BG (Hardedge)" based on gradient by
Saul Goode. See bug #589371.
2009-08-15 11:58:08 +02:00
98aaae7cac app: Clean up internal gradient construction
Move code that is not shared between all gradients out of
gimp_gradients_add_gradient() and group the code with comments.
2009-08-15 11:48:36 +02:00
3d0c025a51 app: Support obsolete data resources
Add support for having obsolete data resources. An obsolete resource
is not shown in the UI or managed in any way, but it will be
considered when plug-ins requests resources. This in order to maintain
backwards compatibility for plug-ins.
2009-08-13 21:54:00 +02:00
28aa03e525 Move gimp_image_raise_layer_to_top() around
Reorder functions so layer reorder function are in the same
order as channel and vectors ones.
2009-08-10 00:45:25 +02:00
dc53e81705 Make sure items passed as "parent" are actually group items
Add precondition checks to all image add() and reorder() functions
2009-08-10 00:45:24 +02:00
b1e969cc6d app: Fix typo gimpgoruplayer 2009-08-08 15:26:34 +02:00
b9b05e7d39 app: Don't reuse the GeglProcessor
Don't reuse the GeglProcessor as it can't handle dirty rects when
painting in GIMP, and this makes it harder to make GEGL-wise progress
in other parts of GIMP.
2009-08-08 07:03:15 +02:00