Implementing offset layer operation
Lukast dev
lukast.dev at gmail.com
Mon Feb 18 20:33:00 UTC 2013
Hello,
I'm trying to implement offset layer operation
https://bugs.kde.org/show_bug.cgi?id=315367
In Gimp it is in Layer -> Transform -> Offset
In Krita I want to implement it only with warp mode.
Other modes in GIMP are combos of move tool + fill tool (filling with
color or with transparent pixels)
I want to implement it simply, something like mirror layer operation.
I'm little bit out of sync what is the current status of implementing
it correctly.
When I look how ROTATE is implemented, it goes like this:
Let's start in ...
RotateImage::slotRotateLayer() ( rotateimage.cpp ) calls
KisNodeManager::rotate calls
KisLayerManager::rotateLayer calls
KisImage::rotateNode calls
KisImage::rotateImpl calls
lot of processing framework related classes, interesting ones are
KisProcessingApplicator and KisProcessingVisitor
(KisTransformProcessingVisitor) and calls
KisProcessingApplicator::applyVisitor
When I look how MIRROR Horizontally is implemented, it goes like this:
KisNodeManager::mirrorNodeX() calls
KisNodeManager::mirrorNode calls
KisNode::accept(KisMirrorVisitor) calls
KisNodeVisitor::visit
Hint: Offset operation is almost like mirror horrizontally operation
e.g. in GIMP
it does not transform masks.
I'm not sure if I understand it correctly.
The ROTATE implementation is way to go? Or MIRROR code is way to go?
It seems to me that mirror operation is not ported to processing
framework, is that right?
Best regards,
Lukas
More information about the kimageshop
mailing list