| java.lang.Object org.openlaszlo.iv.flash.api.FlashItem org.openlaszlo.iv.flash.api.Color
All known Subclasses: org.openlaszlo.iv.flash.api.AlphaColor,
Color | public class Color extends FlashItem (Code) | | Opaque RGB Color without alpha value
author: Dmitry Skavish See Also: AlphaColor |
Field Summary | |
protected int | b | protected int | g | protected int | r |
Constructor Summary | |
public | Color() | public | Color(int rgb) | public | Color(int r, int g, int b) | public | Color(float r, float g, float b) |
Color | public Color(int rgb)(Code) | | Creates color from int
Parameters: rgb - color encoded as folows: red<<16 | green<<8 | blue |
Color | public Color(int r, int g, int b)(Code) | | Creates Color from three integer
components each on range 0, 255
Parameters: r - red Parameters: g - green Parameters: b - blue |
Color | public Color(float r, float g, float b)(Code) | | Creates Color from three float
components each on range 0.0, 1.0
Parameters: r - red Parameters: g - green Parameters: b - blue |
brighter | public Color brighter(double f)(Code) | | Returns new color with changed brightness
Parameters: f - brightness change:- [-1..0] - makes it darker
- [0..1] - makes it brighter
new color |
getAWTColor | public java.awt.Color getAWTColor()(Code) | | Returns java.awt.Color corresponding to this one
|
getAlpha | public int getAlpha()(Code) | | |
getBlue | public int getBlue()(Code) | | |
getGreen | public int getGreen()(Code) | | |
getRGB | public int getRGB()(Code) | | Returns color encoded as int
color encoded as follows: red<<16 | green<<8 | blue |
getRed | public int getRed()(Code) | | |
hasAlpha | public boolean hasAlpha()(Code) | | Returns true or false depending on whether this object has alpha or not
|
parse | public static Color parse(Parser p, boolean withAlpha)(Code) | | Parses color
Parameters: p - parser to parse from Parameters: withAlpha - if true then parse as AlphaColor if false then parse as Color Color or AlphaColor depending on parameter withAlpha |
parseRGB | public static Color parseRGB(Parser p)(Code) | | Parses color as RGB
Parameters: p - Parser to parse from always Color |
parseRGBA | public static AlphaColor parseRGBA(Parser p)(Code) | | Parses color as RGBA
Parameters: p - Parser to parse from always AlphaColor |
setBlue | public void setBlue(int b)(Code) | | |
setGreen | public void setGreen(int g)(Code) | | |
setRGB | public void setRGB(int rgb)(Code) | | Sets color encoded as int
Parameters: rgb - color encoded as folows: red<<16 | green<<8 | blue |
setRed | public void setRed(int r)(Code) | | |
skip | public static void skip(Parser p, boolean withAlpha)(Code) | | |
writeRGB | public void writeRGB(FlashOutput fob)(Code) | | Writes RGB color to FlashBuffer
Parameters: fob - flash buffer to write |
writeRGBA | public void writeRGBA(FlashOutput fob)(Code) | | Writes RGBA color to FlashBuffer
Alpha is 255, i.e. color is opaque
Parameters: fob - flash buffer to write |
|
|