Joseph Miller wrote:
>     Interesting patch, but it is unfortunately in the wrong direction.
>     Non-destructive scaling needs to be implemented with GEGL and not by
>     hijacking layer group semantics.
> Thanks for the link on the patch format.  I'll look over that straight 
> away.  Would you explain how I should go about doing this with GEGL?  Do 
> I just need to change my approach in gimpgrouplayernd.*?  Since I am not 
> familiar with GIMP or GEGL development, a quick outline for what I need 
> to do and where I need to make my entry points would help me a great deal.
> I am at this point looking for drop-in functionality.  I know that once 
> GEGL is fully integrated this type of approach would be obsolete.  I 
> would be OK with that *if* GEGL is not ready for this type of drop-in 
> addition.  I would also be happy to work on GEGL as well, but I need 
> something I can use pretty quickly.  I would be thankful for any 
> direction you can provide.

With GEGL, this will be done through a scale node, like 
"gegl:transform", in the image graph. The code to manage this probably 
will not end up in about the same size as what you have already, except 
it will use GEGL API instead of GIMP's pixel region APIs. We have 
already ported the projection to GEGL, so simply look at the existing 
GEGL code (git grep gegl_) and extrapolate to get a good estimate on how 
a "gegl:transform" node would be added to the graph.

And while I'm at it I can mention that your code have some coding style 
issues. Introducing an abbreviation like "nd" for "non-destructive" is 
too short-sighted, so it is better to spell that out. Otherwise we will 
forget what it stands for. And the opening brace for 
gimp_group_layernd_update_scale() is not on a separate line. This is not 
a problem if it's a local drop-in functionality hack of course.

Hope this helps in some way,


My GIMP Blog:
"Reducing UI clutter, docking bars removed"
Gimp-developer mailing list

Reply via email to