Aztec® Programming Language

Version 1.0 Alpha

Copyright © 2010-2013

Cold Spring® Development Group

All Rights Reserved

Download Aztec

Site Help

aztec.display.Pen

public class Pen from<Base>

Base

Pen

The Pen class represents a combination of color, line style (solid, dash, dot, etc.) and line width. It is used by the Aztec drawing methods when drawing lines and borders within the Canvas control.

 

Note that a Pen 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. Allocating a new Pen object every time a window has to be redrawn could eventually cause UI resources to run out.

Pen Methods

Pen() Constructor for the Pen class using Color, Style and Width
Pen() Constructor for the Pen class using another Pen object
Color() Returns the Color object embedded in the Pen object
LineStyle() Returns the line style for the Pen object (e.g. Solid)
LineWidth() Returns the width of the line for the Pen object (in pixels)

Pen Constants

Constant Data Item Data Type Value
Pen.Solid int 1
Pen.Dash int 2
Pen.Dot int 3
Pen.DashDot int 4

Derived Classes

See Also

 


Pen()

public method Pen(Color ColorRef, int LineStyle = Pen.Solid, int LineWidth = 1)

Parameters

Color

Color object to be used by the pen when drawing

LineStyle

Style for the line

LineWidth

Width of the line Blue component of the color (0-255)

Return Value

None

Description

Constructor for the Pen class. All line drawing using this pen will use the associated Color, line style and line width. The line style is one of the constants provided in this class (Solid, Dash, Dot or DashDot). The line width is specified in pixels. The Pen object is associated with the same Display that the Color object is associated with, and can only be used with that Display.

 

Pen Class


Pen()

public method Pen(Pen PenRef)

Parameters

PenRef

Pen object to be copied for this new pen

Return Value

None

Description

Constructor for the Pen class. The new pen uses the same color, line style and line width as the incoming Pen object.

 

Pen Class


Color()

public method<Color> Color()

Parameters

None

Return Value

Color of the Pen

Description

This method returns the Color object associated with this Pen object.

 

Pen Class


LineStyle()

public method<int> LineStyle()

Parameters

None

Return Value

Line style of the Pen

Description

This method returns the line style for the Pen object (Solid, Dash, Dot or DashDot).

 

Pen Class


LineWidth()

public method<int> LineWidth()

Parameters

None

Return Value

Line width of the Pen

Description

This method returns the line width (in pixels) for the Pen object.

 

Pen Class

 

Copyright © 2010-2013

Cold Spring Development Group

All Rights Reserved

Download Aztec