opensubscriber
   Find in this group all groups
 
Unknown more information…

q : quartz-dev@lists.apple.com 3 January 2006 • 11:30PM -0500

cgshading bug? - alpha and white gradients
by Alexander Kellett

REPLY TO AUTHOR
 
REPLY TO GROUP




replacing the trivial code snippet:

static void myCalculateShadingValues (void *info,
                             const float *in,
                             float *out)
{
     float v;
     size_t k, components;
     components = (size_t)info;
     v = *in;
     for (k = 0; k < components -1; k++)
         *out++ = 1;  // white
      *out++ = v; // gradient on opacity
}

in the one from the example in the quartz 2d programming
guide shows an issue with transparent whites.

the semicircle on my ibook is fully opaque white rather than  
translucent.
(note, the example in question draws a white background, i have replaced
  this with a black background to demonstrate the issue)
changing the "// white" line to 0.9 fixes this rather strange issue.

it happens if any single one of the r, g or b values are 1.

any ideas for workarounds or what on earth i'm doing wrong? or is  
this really a bug?

thanks in advance,
Alex
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list      (Quartz-dev@list...)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartz-dev/subscriber%40opensubscriber.com

This email sent to subscriber@open...

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

opensubscriber is not affiliated with the authors of this message nor responsible for its content.