com.supermap.data
Class Color
- java.lang.Object
-
- com.supermap.data.Color
-
public class Color extends java.lang.Object
SuperMap iMobile RGB color class.
-
-
Constructor Summary
Constructors Constructor and Description Color(int rgb)
Construct a color class with a RGB color valueColor(int r, int g, int b)
Create a color class with three color components of RGB.Color(int r, int g, int b, int a)
Create a color class with three color components of RGB.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description int
getA()
Return a transparency componentint
getB()
Return a blue componentint
getG()
Return a green componentint
getR()
Return a red componentint
getRGB()
Return a RGB color valueint
getRGBA()
Return a RGBA color valuejava.lang.String
toColorString()
Return RGB color value hexadecimal string.
-
-
-
Constructor Detail
-
Color
public Color(int rgb)
Construct a color class with a RGB color value- Parameters:
rgb
- RGB value
-
Color
public Color(int r, int g, int b)
Create a color class with three color components of RGB.- Parameters:
r
- redg
- greenb
- blue
-
Color
public Color(int r, int g, int b, int a)
Create a color class with three color components of RGB.- Parameters:
r
- redg
- greenb
- bluea
- transparency
-
-
Method Detail
-
getR
public int getR()
Return a red component- Returns:
- Red component
-
getG
public int getG()
Return a green component- Returns:
- Green component
-
getB
public int getB()
Return a blue component- Returns:
- Blue component
-
getA
public int getA()
Return a transparency component- Returns:
- Transparency component
-
getRGB
public int getRGB()
Return a RGB color value- Returns:
- RGB color value
-
getRGBA
public int getRGBA()
Return a RGBA color value- Returns:
- RGBA color value
-
toColorString
public java.lang.String toColorString()
Return RGB color value hexadecimal string.This type string can be accepted by Android and convert to the color of android.
- Returns:
- RGB color value
-
-