Bug 552 : Transparency not reliable
Last modified: 2008-08-16 14:51




Status:
RESOLVED
Resolution:
INVALID -
Priority:
P4
Severity:
normal

 

Reporter:
softhook
Assigned To:
fry

Attachment Type Created Size Actions

Description:   Opened: 2007-05-03 17:45
float temp1 = familyColor >> 16 & 0xFF;
float temp2 = familyColor >> 8 & 0xFF;
float temp3 = familyColor & 0xFF;

dotcolour = color(temp1,temp2,temp3,transparency);

99.9% of the time this code works. Sometimes though instead of transparency
you get black or green colors. I have code that can reproduce the error.
Email me if you want it: christian@softhook.com
Additional Comment #1 From fry 2007-05-03 18:01
hm, you'd need to show a case for which it breaks, please just post it here.

you might also need to put familyColor >> 8 inside parens, because of its
operator precedence relative to &.
Additional Comment #2 From fry 2008-08-16 14:51
closing, operator precedence issue & no followup.