<div dir="ltr">On my website [1] are sources of deform paintOp -- it does not work, but you can take a look at the way i access pixels...<br><br>[1] <a href="http://lukast.mediablog.sk/deform.tar.gz">http://lukast.mediablog.sk/deform.tar.gz</a><br>
<br><div class="gmail_quote">2008/10/16 <a href="mailto:LukasT.dev@gmail.com">LukasT.dev@gmail.com</a> <span dir="ltr">&lt;<a href="mailto:lukast.dev@gmail.com">lukast.dev@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<br>
<br>
I started to develop deform paintop (something like iWrap in gimp) and I got problems with accessing pixels from current node.<br>
The brush deform image with inverse wrapping, it just move with pixels and should produce fun results from photos. I have implemented it these days in OpenCV,<br>
so I decided to implement it like a brush in Krita. I respect feature freeze.<br>
<br>
But how do i access that pixels?<br>
<br>
The actual status is that e.g. my hairy brush is trying to access pixels from layer using<br>
painter-&gt;device() method which is invoked inside paintLine in kis_sumiebrush<br>
<br>
The results are two:<br>
a) Paint incrementaly in GUI not checked<br>
Brush produce just black pixels which are bitblt on the layer -- I suppose, that no pixels are read from layer and I don&#39;t know why<br>
the color of hairs is black.<br>
<br>
b) Paint incrementaly checked in GUI<br>
Brush (when paint in brush.cpp uses mixCMYK) access just pixels that has already painted through the one stroke and is able to mix them together.<br>
<br>
<br>
Now I investigate sources and I was trying to do this:<br>
I&#39;m painting with method myPaint(KisPaintDeviceSP dab, KisPaintDeviceSP layer, KisInfo...)<br>
I created two random accessors, one used for reading (random accessor for layer) and one for writing (random accessor for dab).<br>
<br>
The result is that when i use layer as painter-&gt;device(), I don&#39;t get access to pixels in current layer...<br>
I was trying to use KisPaintOpSettings::node(), but that returns KisNodeSP. What is KisNode used for?<br>
I also found currentNode()-&gt;paintDevice() in freehand tool . I was not able to understand how do I send it to my paintOp...<br>
<br>
Duplicate paintop access pixels, but actually it crashes, slangkamp told me because of refactor of paintops..<br>
I did not find any paintop that reads pixels from node and actually works..<br>
<br>
Could you explain it to me? I spend some time and I was not able to came up with solution...<br>
<br>
Have a nice day<br>
Lukas<br>
</blockquote></div><br></div>