[cairo] Blend modes take 3
Benjamin Otte
otte at gnome.org
Sun Nov 23 09:45:30 PST 2008
On Wed, Nov 19, 2008 at 7:00 PM, Soeren Sandmann <sandmann at daimi.au.dk> wrote:
> Hi Benjamin,
>
> Overall, the separable blend mode stuff looks good, except for the
> component alpha versions.
>
New update pushed to my git branches of pixman/cairo.
I've updated the separable blend modes according to your explanation.
However, I couldn't figure out how to compute luminance or saturation
from component-alpha versions. So I left the non-separable versions
alone, as I'd rather not do something stupid.
> - I'd like to see one comment that explains how PDF blending works in
> general, then for each blend function just have the comment describe
> the blending, not the whole operation.
>
> - There is a spurious while() in BlendOverlay().
>
> - "Separable" is spelled like that, not "Seperable"
>
> - There is a semicolon after while(0) in the Subtract macro
>
> - I think the Subtract blend mode should be called something like
> FLASH_SUBTRACT since it is so weird and is not actually the inverse
> of Add.
>
All of them applied.
> I did not yet look at the non-separable blend modes, except that I'm
> wondering whether the Lum macro has sufficient precision when blending
> in 64 bit mode?
>
I checked that the Lum macro takes at most a value of the size of a
comp2_t but is only called with values of size comp4_t, so I'm very
sure that it never overflows.
Cheers,
Benjamin
More information about the cairo
mailing list