Attached is a quick patch for imlib2's "grad.c" file..
It fixes some things I noticed there while re-familiarizing myself
with evas/imlib2's gradients.
        This (very quickly done) patch fixes:
1. blending with the ADD/SUB/RE ops when the dest image
    has alpha.
2. the op ADD case was set to do a BLEND_SUB in both the
    rgba and hsva gradient draw functions. 
        Also:
3. added tests for memory allocation of the hlut/vlut tables.
4. removed several unused variables from these functions.
5. as the code for both functions is moderately long but only
    differ by *one* line, I've setup most things as macros.

        This file really needs to be rewritten, as it still does
not handle the cases when the blend context is set to 0, and
it could benefit a lot from optimizations.
        Unfortunately I haven't the time right now to do
this justice, so for now at least it blends correctly :)

                        jose.

Attachment: grad_c.diff
Description: Binary data

Reply via email to