Changeset 6749 in josm
- Timestamp:
- 2014-01-21T13:38:07+01:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java
r6737 r6749 216 216 /** 217 217 * Get the value of the red color channel in the rgb color model 218 * @return the red color channel in the range [0;1] 218 219 * @see java.awt.Color#getRed() 219 220 */ … … 224 225 /** 225 226 * Get the value of the green color channel in the rgb color model 227 * @return the green color channel in the range [0;1] 226 228 * @see java.awt.Color#getGreen() 227 229 */ … … 232 234 /** 233 235 * Get the value of the blue color channel in the rgb color model 236 * @return the blue color channel in the range [0;1] 234 237 * @see java.awt.Color#getBlue() 235 238 */ 236 239 public static float blue(Color c) { 237 240 return Utils.color_int2float(c.getBlue()); 241 } 242 243 /** 244 * Get the value of the alpha channel in the rgba color model 245 * @return the alpha channel in the range [0;1] 246 * @see java.awt.Color#getAlpha() 247 */ 248 public static float alpha(Color c) { 249 return Utils.color_int2float(c.getAlpha()); 238 250 } 239 251 -
trunk/src/org/openstreetmap/josm/tools/Utils.java
r6742 r6749 257 257 258 258 /** 259 * convert back 259 * convert integer range 0..255 to float range 0 <= x <= 1 260 * when dealing with colors and color alpha value 260 261 */ 261 262 public static Float color_int2float(Integer val) {
Note: See TracChangeset
for help on using the changeset viewer.