Aztec® Programming Language
Version 1.1 Alpha 2

Copyright © 2010-2017, Aztec Development Group, All Rights Reserved

Download Aztec

Search        Contact Us

I've driven every kind of rig that's ever been made...

Driven the back roads so I wouldn't get weighed.

- Lowell George

 

aztec.ui.Color

public class Color from<Base>

Base

Color

The Color class represents a single color which can be drawn in an Aztec window. A color object is made up of three separate components, a red, green and blue component. Each component can have a value from 0 to 255, supporting more than 16 million separate colors. This color can be attached to any window to specify the default foreground and background colors for a window, and can also be used with the drawing methods in the Canvas control

 

The Color object also registers a color resource with the Display with which it will be used (which is passed into the constructor). If the Color is used to write or draw on a Display other than the one for which it was created, a DisplayException will be fired.

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

See Also

 


Color()

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


IsValid()

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


Display()

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


Red()

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


Green()

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


Blue()

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

 

Copyright © 2010-2017

Aztec Development Group

All Rights Reserved

Download Aztec