Two more functions for the colorstrategy?
Boudewijn Rempt
boud at valdyas.org
Tue Aug 9 09:26:57 CEST 2005
KisPaintDevice has two function, clearSelection and applySelection that do
some maths with the alpha value. Both functions use KisPixel with its
hard-coded 8-bit alpha value, although clearSelection puts the value in a
short
clearSelection does: MAX_SELECTED - selection alpha * device alpha
applySelection does: selection alpa * device alpha / MAX_SELECTED
I think we should push these computations back into the color strategy -- but
I'm not sure of a good name for them.
Oh, and in the selection manager there's another routine to apply a selection
mask, and this one does:
p.alpha() = UINT8_MULT(p_alpha, s_alpha);
--
Boudewijn Rempt
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/20050809/001b0097/attachment.pgp
More information about the kimageshop
mailing list