>>>>> "TH" == Ted Hill <[EMAIL PROTECTED]> writes:

TH> When I scale and translate the float data to ints, what I want to
TH> do is to get the higher float values to show up as a shade of red
TH> and everything else to be completely transparent.

    If you want different levels of transparency you need different
alpha values.  Currently you always set the transparency to 0x7F.

    You need some kind of if statement:

    if (floatData[i] > <threshold>)
      intData[i] =  alpha | ((int)(floatData[i] * scaleFactor) &
                             0x00ff0000));    // mask off the non-red bits
    else
      intData[i] =  0x00 | ((int)(floatData[i] * scaleFactor) &
                             0x00ff0000));    // mask off the non-red bits

The else clause could also be:
       inData[i] = 0;

    Since if it is completely transparent you don't really care what
the 'color' is...

--
                                                        Thomas DeWeese
[EMAIL PROTECTED]
                          "The only difference between theory and practice is
                           that in theory there isn't any." -- unknown

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to