Problems with "embedded" transparency masks onto adj. layers
Boudewijn Rempt
boud at valdyas.org
Wed Sep 9 08:38:10 CEST 2009
On Tuesday 08 September 2009, Dmitry Kazakov wrote:
> > It used to work just fine in 1.6, where we used an alpha8 colorspace and
> > COMPOSITE_OVER to paint on selections, I'm not sure I understand why this
> > would not work in 2.x. I definitely don't believe we need to double the
> > memory
> > requirements of selections to be able to paint on them: I think using a
> > different composite op should be enough.
>
> How are you intending to describe the shape of the brush without a separate
> alpha channel?
>
Well, we probably need to compare the current code to the code in 1.6, but
there it worked perfectly. This is how the selection brush worked in 1.6:
...
m_target = selection;
m_painter = new KisPainter(selection.data());
Q_CHECK_PTR(m_painter);
m_painter->setPaintColor(KisColor(Qt::black, selection->colorSpace()));
m_painter->setBrush(m_subject->currentBrush());
m_painter->setOpacity(OPACITY_OPAQUE);
m_painter->setCompositeOp(COMPOSITE_OVER);
KisPaintOp * op = KisPaintOpRegistry::instance()->paintOp("paintbrush", 0,
painter());
painter()->setPaintOp(op); // And now the painter owns the op and will
destroy it.
...
--
Boudewijn Rempt | http://www.valdyas.org
More information about the kimageshop
mailing list