Aztec® Programming Language

Version 1.0 Alpha

Copyright © 2010-2013

Cold Spring® Development Group

All Rights Reserved

Download Aztec

Site Help

aztec.display.Font

public class Font from<Base>

Base

Font

The Font class represents a text font which can be used to draw text. The font can be attached to any window to specify the appearance of text within that window. The name of the font and the point size (8, 10, 12, etc.) is used when creating the font. The class also provides an IsValid() method to indicate whether the font name and point size were valid when creating the font.

 

Note that a Font object uses UI system resources which are limited by the OS. It works most efficiently when allocated once and then used each time a window needs to be redrawn. If used in a Canvas control, allocating a new Font object every time a window has to be redrawn could eventually cause UI resources to run out.

Font Methods

Font() Constructor for the Font class using a font name and point size
Font() Constructor for the Font class using another Font object
IsValid() Returns true if the Font object is valid
Name() Returns the name of the Font
Size() Returns the point size of the Font

Derived Classes

See Also

 


Font()

public method Font(string FontName, int PointSize, Display Target = null)

Parameters

FontName

Name of font (e.g. "courier")

PointSize

Point size for specified font

Target

Display object where font is created and used

Return Value

None

Description

Constructor for the Font class. The font is based on the name and the point size passed in. This Font object can then be attached to any window to control the appearance of text drawn in that window. The local display is used if Target is null.

 

Font Class


Font()

public method Font(Font FontRef)

Parameters

FontRef

Font to be copied for this new font

Return Value

None

Description

Constructor for the Font class. The new font uses the same font name and point size as the incoming Font object.

 

Font Class


IsValid()

public method<bool> IsValid()

Parameters

None

Return Value

Returns true if the font object is valid

Description

This method returns true if the font is valid (based on the specified font name and size.

 

Font Class


Name()

public method<string> Name()

Parameters

None

Return Value

Returns the font name

Description

This method returns the name of the font as specified in the constructor.

 

Font Class


Size()

public method<int> Size()

Parameters

None

Return Value

Returns point size for font

Description

This method returns the point size for the font as specified in the constructor.

 

Font Class

 

Copyright © 2010-2013

Cold Spring Development Group

All Rights Reserved

Download Aztec