Converting AWT Color into int fails when using pure blue and alpha 0
in
Programming Questions
•
1 year ago
I'm using
AWT Colors within my Sketch and I have methods to set the transparency and convert them to Processing's int equivalent (I'm using Eclipse and the main PApplet class).
I debugged the Color values of Red / Green / Blue / Alpha / RGB int and got for the faulty case:
0/0/255/0/255
Any ideas?
Best regards,
Eric
- public Color setAlpha(final Color color, final int transparency) {
- return new Color(color.getRed(), color.getGreen(), color.getBlue(), transparency);
- }
- public void fill(final Color color) {
- fill(color.getRGB());
- }
I debugged the Color values of Red / Green / Blue / Alpha / RGB int and got for the faulty case:
0/0/255/0/255
Any ideas?
Best regards,
Eric
1