
Color
Color Methods
| Color() | Constructor for the Color class using separate RGB values |
| IsValid() | Returns true if the Color object is valid |
| Display() | Reference to Display object where Color was created |
| Red() | Returns the Red component of the Color object |
| Green() | Returns the Green component of the Color object |
| Blue() | Returns the Blue component of the Color object |
Derived Classes
None
See Also
Class Hierarchy, Window, Canvas, Font, Pen
public method Color(int Red, int Green, int Blue, Display Target = null)
Parameters
Red
Red component of the color (0-255)
Green
Green component of the color (0-255)
Blue
Blue component of the color (0-255)
Target
Display object where color is created and used
Return Value
None
Description
Constructor for the Color class. The color is based on the red, green and blue components passed in. The local display is used if Target is null.
Color Class
public method<bool> IsValid()
Parameters
None
Return Value
Returns true if the color object is valid
Description
This method returns true if the color is valid.
Color Class
public method<Display> Display()
Parameters
None
Return Value
Returns reference to Display object
Description
This method returns the reference to the Display object where the Pen was created (the Display that was passed into the constructor). If a null was passed into the constructor, the local display is used, and this method returns the reference to the local Display object.
A Color resource is created within the context of a Display, and it can only be used with that Display. If a Color is used with a Display where it was not created, a DisplayException will be fired.
Color Class
public method<int> Red()
Parameters
None
Return Value
Red component of color
Description
This method returns the Red component of the Color object (0-255).
Color Class
public method<int> Green()
Parameters
None
Return Value
Green component of color
Description
This method returns the Green component of the Color object (0-255).
Color Class
public method<int> Blue()
Parameters
None
Return Value
Blue component of color
Description
This method returns the Blue component of the Color object (0-255).
Color Class