#ifdef INFINITE_CANVAS

Dmitry Kazakov dimula73 at gmail.com
Sat Dec 5 23:14:19 CET 2009


On Fri, Dec 4, 2009 at 2:21 AM, LukasT.dev at gmail.com
<lukast.dev at gmail.com>wrote:

> Hi,
>
> I commited fix for the outline of the selection by outline tool and I
> wanted to
> ask what we will do with the buffer I added to QPainter canvas? Should I
> still
> produce two versions code? One for the canvas with buffer compiled and one
> without? I added black background to the dotted line as second version btw.
>
> When I added the QImage as another buffer there were some things about the
> speed. So do we plan to leave the buffer or remove? Or merge somehow with
> projection? But how? QImage in QPainter canvas = projection image + gray
> borders => RasterOp_XOR works for tools
>
> The QImage is used so that every platform uses RasterOp for the canvas so
> that
> we get RasterOp_XOR working and having visible tool outlines.
>
> On the other hand it may be slowing down the performance because of another
> buffer. I did not notice any difference but I don't know how to measure it.
>
> So what? Remove the ifdef and use INFINITE or produce two versions? That
> means
> support 3 canvas types = OpenGL and QPainter with and without RasterOp_XOR.
>
> ?
>

I think we should merge them somehow.

What we have at the moment (in update order):

image->rootLayer()->projection() - stores image without any borders and
decorations (using tiles)
view->prescaledProjection()::d->projectionBackend - stores unscaled original
(either tiles or QImage - config-dependent)

view->prescaledProjection()->prescaledQImage() - i'm not sure what stuff is
painted in this image. It stores scaled-down image, shifted according to
view state. As far as i know it doesn't have any selections, flakes(?)
inside - they are painted in canvas->drawDecorations().

<-- here we want to have another copy of it with prepainted decorations

After this we paint an outcome onto the window.


Lukas, is there any way to draw decorations on some transparent "layer"
(QImage) and then just paint this at the top of the base image?

Btw, i still don't fully understand what is "INFINITE" =) I haven't found
such a name in QPainterCanvas. It is the feature that i can paint outside
actual image, isn't it?


-- 
Dmitry Kazakov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kimageshop/attachments/20091206/3fe600e7/attachment.htm 


More information about the kimageshop mailing list