A set of Magic tools that offer warping effects, similar to GIMP's "Warp Transform" tool:
* Move pixels (like our "Smudge", but without blurring/blending)
* Grow area (dilate)
* Shrink area (contract)
* Swirl (both clockwise (CW) and counter-clockwise (CCW))
In GIMP, this is handled by the GEGL library; see https://gitlab.gnome.org/GNOME/gegl/-/blob/master/operations/common-cxx/warp.cc (Prior to digging that up, I started on something, currently located in magic/src/WIP/warp.c. It tries to create a 'mesh' which gets pushed around during mouse motion (drag), but so far it's very slow and the actual warping is not implemented. I was considering cribbing the code from the perspective tool, to apply perspective to small pieces of the picture, but that doesn't sound like it would perform well.)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In GIMP, this is handled by the GEGL library; see https://gitlab.gnome.org/GNOME/gegl/-/blob/master/operations/common-cxx/warp.cc (Prior to digging that up, I started on something, currently located in
magic/src/WIP/warp.c
. It tries to create a 'mesh' which gets pushed around during mouse motion (drag), but so far it's very slow and the actual warping is not implemented. I was considering cribbing the code from the perspective tool, to apply perspective to small pieces of the picture, but that doesn't sound like it would perform well.)See also