|
Bridges-Java-2.3.3
2.3.3
Bridges(JavaAPI)
|
This class is used to represent colors in BRIDGES. More...
Public Member Functions | |
| Color () | |
| Color (int r, int g, int b, float a) | |
| Color (int r, int g, int b) | |
| Color (String color) | |
| void | setColor (int r, int g, int b, float a) |
| void | setRed (int r) |
| int | getRed () |
| void | setGreen (int g) |
| int | getGreen () |
| void | setBlue (int b) |
| int | getBlue () |
| void | setAlpha (float a) |
| float | getAlpha () |
| String | getRepresentation () |
| String | getHexRepresentation () |
| byte[] | getByteRepresentation () |
| void | setColor (String col_name) |
This class is used to represent colors in BRIDGES.
We use an RGBA model to represent colors, with each component in the range 0-255. BRIDGES also supports named colors for user convenience, but these are converted into [RGBA] prior to transmission to the server for visualization.
| bridges.base.Color.Color | ( | ) |
Constructors
| bridges.base.Color.Color | ( | int | r, |
| int | g, | ||
| int | b, | ||
| float | a | ||
| ) |
Constructor, given r, g, b, a components
| r,g,b,a | - checked to be in the range 0-255 |
| bridges.base.Color.Color | ( | int | r, |
| int | g, | ||
| int | b | ||
| ) |
Constructor, given r, g, b components alpha (opacity) defaults to 255
| r,g,b,a | - checked to be in the range 0-255 |
| bridges.base.Color.Color | ( | String | color | ) |
Constructor, given color name
| color | - checked to be in the list of possible color names |
| float bridges.base.Color.getAlpha | ( | ) |
gets the alpha component
| int bridges.base.Color.getBlue | ( | ) |
gets the blue component
| byte [] bridges.base.Color.getByteRepresentation | ( | ) |
gets a Byte array representation of a Color
| int bridges.base.Color.getGreen | ( | ) |
gets the green component
| String bridges.base.Color.getHexRepresentation | ( | ) |
gets the RGB Color representation as a Hex String
| int bridges.base.Color.getRed | ( | ) |
gets the red component
| String bridges.base.Color.getRepresentation | ( | ) |
gets the Color representation as a String
| void bridges.base.Color.setAlpha | ( | float | a | ) |
sets the alpha(opacity) component
| a | - checked to be in the range 0-255 |
| void bridges.base.Color.setBlue | ( | int | b | ) |
sets the blue component
| b | - checked to be in the range 0-255 |
| void bridges.base.Color.setColor | ( | int | r, |
| int | g, | ||
| int | b, | ||
| float | a | ||
| ) |
sets color to the given r, g, b, a components
| r,g,b,a | - checked to be in the range 0-255 |
| void bridges.base.Color.setColor | ( | String | col_name | ) |
sets the color to the RGBA components given the color name
| col_name | color name |
| void bridges.base.Color.setGreen | ( | int | g | ) |
sets the green component
| g | - checked to be in the range 0-255 |
| void bridges.base.Color.setRed | ( | int | r | ) |
sets the red component
| r | - checked to be in the range 0-255 |
1.8.10