OpenAPI 1.0

com.aquafold.openapi.type
Interface AQColorFactory


public interface AQColorFactory

This interface provides factory methods for creating AQColor objects.

An instance of this interface is available via aqua.type.color alias.


Method Summary
 AQColor getBlack()
          Returns the color black.
 AQColor getBlue()
          Returns the color blue.
 AQColor getCyan()
          Returns the color cyan.
 AQColor getDarkGray()
          Returns the color dark gray.
 AQColor getGray()
          Returns the color gray.
 AQColor getGreen()
          Returns the color green.
 AQColor getLightGray()
          Returns the color light gray.
 AQColor getMagenta()
          Returns the color magenta.
 AQColor getOrange()
          Returns the color orange.
 AQColor getPink()
          Returns the color pink.
 AQColor getRed()
          Returns the color red.
 AQColor getWhite()
          Returns the color white.
 AQColor getYellow()
          Returns the color yellow.
 AQColor newColor(int rgb)
          Creates an opaque sRGB color with the specified combined RGB value consisting of the red component in bits 16-23, the green component in bits 8-15, and the blue component in bits 0-7.
 AQColor newColor(int rgba, boolean hasAlpha)
          Creates an sRGB color with the specified combined RGBA value consisting of the alpha component in bits 24-31, the red component in bits 16-23, the green component in bits 8-15, and the blue component in bits 0-7.
 AQColor newColor(int r, int g, int b)
          Creates an opaque sRGB color with the specified red, green, and blue values in the range (0 - 255).
 AQColor newColor(int r, int g, int b, int a)
          Creates an sRGB color with the specified red, green, blue, and alpha values in the range (0 - 255).
 AQColor newColorFloat(float r, float g, float b)
          Creates an opaque sRGB color with the specified red, green, and blue values in the range (0.0 - 1.0).
 AQColor newColorFloat(float r, float g, float b, float a)
          Creates an sRGB color with the specified red, green, blue, and alpha values in the range (0.0 - 1.0).
 

Method Detail

newColor

AQColor newColor(int rgb)
Creates an opaque sRGB color with the specified combined RGB value consisting of the red component in bits 16-23, the green component in bits 8-15, and the blue component in bits 0-7. Alpha is defaulted to 255.

Parameters:
rgb - the combined RGB components

newColor

AQColor newColor(int rgba,
                 boolean hasAlpha)
Creates an sRGB color with the specified combined RGBA value consisting of the alpha component in bits 24-31, the red component in bits 16-23, the green component in bits 8-15, and the blue component in bits 0-7. If the hasAlpha argument is false, alpha is defaulted to 255.

Parameters:
rgba - the combined RGBA components
hasAlpha - true if the alpha bits are valid; false otherwise

newColor

AQColor newColor(int r,
                 int g,
                 int b)
Creates an opaque sRGB color with the specified red, green, and blue values in the range (0 - 255). Alpha is defaulted to 255.

Parameters:
r - the red component
g - the green component
b - the blue component

newColor

AQColor newColor(int r,
                 int g,
                 int b,
                 int a)
Creates an sRGB color with the specified red, green, blue, and alpha values in the range (0 - 255).

Parameters:
r - the red component
g - the green component
b - the blue component
a - the alpha component

newColorFloat

AQColor newColorFloat(float r,
                      float g,
                      float b)
Creates an opaque sRGB color with the specified red, green, and blue values in the range (0.0 - 1.0). Alpha is defaulted to 1.0.

Parameters:
r - the red component
g - the green component
b - the blue component

newColorFloat

AQColor newColorFloat(float r,
                      float g,
                      float b,
                      float a)
Creates an sRGB color with the specified red, green, blue, and alpha values in the range (0.0 - 1.0).

Parameters:
r - the red component
g - the green component
b - the blue component
a - the alpha component

getBlack

AQColor getBlack()
Returns the color black.


getBlue

AQColor getBlue()
Returns the color blue.


getCyan

AQColor getCyan()
Returns the color cyan.


getDarkGray

AQColor getDarkGray()
Returns the color dark gray.


getGray

AQColor getGray()
Returns the color gray.


getGreen

AQColor getGreen()
Returns the color green.


getLightGray

AQColor getLightGray()
Returns the color light gray.


getMagenta

AQColor getMagenta()
Returns the color magenta.


getOrange

AQColor getOrange()
Returns the color orange.


getPink

AQColor getPink()
Returns the color pink.


getRed

AQColor getRed()
Returns the color red.


getWhite

AQColor getWhite()
Returns the color white.


getYellow

AQColor getYellow()
Returns the color yellow.


OpenAPI 1.0


Copyright © 2010 AquaFold, Inc. All Rights Reserved. Use is subject to license terms.