Painting on a temporary layer

Boudewijn Rempt boud at valdyas.org
Sun Sep 26 15:06:33 CEST 2004


On Sunday 26 September 2004 14:59, Bart Coppens wrote:
> I looked a bit at how I made a new layer in the text tool, and I was able
> to get the layer to be displayed. Unfortunately it looks really hacky and
> awful: I now use
>
> m_target = dynamic_cast<KisDoc*>(m_subject->document())->layerAdd(
> currentImage(), device->width(), device->height(), "temp", OPACITY_OPAQUE);
>

Have you tried special casing it in renderToProjection in KisImage? Make the 
temp layer a property of KisImage, and check whether it exists, if it does, 
paint it after the right layer.

> instead of manually creating a new layer. Not only does it look ugly, it
> also has the side effect of this layer suddenly becoming visible in the
> layer selection box. And as you feared it's quite slow, so I fear I will
> have to use the undo information...

Bummer, is, I believe, the technical term. Now there's reason enough to make 
the undo and pre-undo information available  in a nice API, because we're 
going to have to do that for a Karbon-like history docker tab but with 
previews....

-- 
Boudewijn Rempt | "Geef mij maar zuurtjes."
http://www.valdyas.org/fading/index.cgi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kimageshop/attachments/20040926/2074ce00/attachment.pgp


More information about the kimageshop mailing list