KisLayer::pixel() and KisLayer::pixel()

Patrick Julien freak at codepimps.org
Mon Nov 3 12:20:49 CET 2003


>
> I'm having two problems with this: first, I am having a hard time
> distinguishing between the two, and would like the setter to be called
> setPixel (analogous to Qt and much of Krita, where the getter is simples
> x(), and the setter setX()), but I'm also wondering whether it's a good
> idea to have a pixel-changing method directly in the paint device, instead
> of in the painter.

OK

>
> Was there a particular reason for this? I can imagine it would be more
> efficient, but it's also another place where we should call the colour
> strategies, or duplicate code.

There we're no color strategies when this was written.  However, a setPixel 
here is actually to mimic an image, i.e. when you want to use the device 
without an actual painter.  The painter is when you want to use the device 
like you would a pixmap.


>
> It is currently only used in the KisSelection::fromImage, which is only
> used in KisDoc::clipboardDataChanged.

So, it's only used right now where the code is treating the device like an 
image.




More information about the kimageshop mailing list