[OpenMap Users] Writing drawingattributes properties

From: chris van lith <chrisvanlith@b3partners.nl>
Date: Sun Aug 22 2004 - 08:00:15 EDT

Hello List,
 
Found another small bug while writing out drawing attribute properties.
In function getProperties the
Integer.toHexString(((Color)somePaint).getRGB()) function returns a string
with no positions for the alpha value, in case alpha = 0. When reading this
back in it will default to an alpha value of 1, just the opposite.
 
So I prepadded some zeros to get the correct effect:
 
            StringBuffer hexstring = new
StringBuffer(Integer.toHexString(((Color)somePaint).getRGB()));
            while (hexstring.length()<8) hexstring.insert(0,'0');
 
Regards
 
Chris

--
[To unsubscribe to this list send an email to "majdart@bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Sun Aug 22 08:00:59 2004

This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:39 EDT