PaintOp and accessing pixels
Lukast dev
lukast.dev at gmail.com
Fri Oct 17 00:05:47 CEST 2008
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...
[1] http://lukast.mediablog.sk/deform.tar.gz
2008/10/16 LukasT.dev at gmail.com <lukast.dev at gmail.com>
> Hello,
>
> I started to develop deform paintop (something like iWrap in gimp) and I
> got problems with accessing pixels from current node.
> 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,
> so I decided to implement it like a brush in Krita. I respect feature
> freeze.
>
> But how do i access that pixels?
>
> The actual status is that e.g. my hairy brush is trying to access pixels
> from layer using
> painter->device() method which is invoked inside paintLine in
> kis_sumiebrush
>
> The results are two:
> a) Paint incrementaly in GUI not checked
> Brush produce just black pixels which are bitblt on the layer -- I suppose,
> that no pixels are read from layer and I don't know why
> the color of hairs is black.
>
> b) Paint incrementaly checked in GUI
> 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.
>
>
> Now I investigate sources and I was trying to do this:
> I'm painting with method myPaint(KisPaintDeviceSP dab, KisPaintDeviceSP
> layer, KisInfo...)
> I created two random accessors, one used for reading (random accessor for
> layer) and one for writing (random accessor for dab).
>
> The result is that when i use layer as painter->device(), I don't get
> access to pixels in current layer...
> I was trying to use KisPaintOpSettings::node(), but that returns KisNodeSP.
> What is KisNode used for?
> I also found currentNode()->paintDevice() in freehand tool . I was not able
> to understand how do I send it to my paintOp...
>
> Duplicate paintop access pixels, but actually it crashes, slangkamp told me
> because of refactor of paintops..
> I did not find any paintop that reads pixels from node and actually works..
>
> Could you explain it to me? I spend some time and I was not able to came up
> with solution...
>
> Have a nice day
> Lukas
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kimageshop/attachments/20081017/df95e642/attachment.htm
More information about the kimageshop
mailing list