#ifdef INFINITE_CANVAS

LukasT.dev@gmail.com lukast.dev at gmail.com
Sun Dec 6 13:57:10 CET 2009


On Saturday 05 December 2009 23:14:19 Dmitry Kazakov wrote:
> On Fri, Dec 4, 2009 at 2:21 AM, LukasT.dev at gmail.com
> 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?

I'm not sure :/ because sometimes you want to paint the decorations, brush 
outlines on the border of the canvas. Maybe we can find some way how to tile 
the canvas qimage so that borders are separated rectangular tiles and canvas 
image is the one from the methods you mention. But then I don't know how to 
paint stuff easily :( 

> 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?

Sorry, it is typo, it is INDEPENDENT_CANVAS and I named it that way because it 
brings independence to platforms regarding the rendering the UI stuff. Windows
uses raster engine AFAIK, Linux has X11, but this way you can force the widget 
to use Raster and I don't know about Mac OS but same applies to Mac - Raster 
is used for the one widget.

I was thinking about Why not run krita like krita --graphicssystem=raster (not 
exactly sure) but then raster is used for every widget. Raster is slower (I 
read it somewhere) then X11 because of some optimizations I suppose..
 


More information about the kimageshop mailing list