Aztec® Programming Language
Version 1.1 Alpha 2

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

Download Aztec

Search        Contact Us

He wants to dream like a young man...

With the wisdom of an old man.

- Bob Seger

 

aztec.ui.BitMap

public class BitMap from<Base>

Base

BitMap

The BitMap class represents a binary Windows bitmap image. It can be created from a ".bmp" file or a ".ico" file, and can also be created using an ID value corresponding to a set of internal bitmap images. A general BitMap object can be used in the MenuItem, ToolBarItem, Button and Canvas classes. If the BitMap is an icon, it can be attached to a Frame or a Dialog, where it is displayed in the window's title bar.

BitMap Methods

BitMap() Constructor for the BitMap class using an internal ID value
BitMap() Constructor for the BitMap class using a bitmap or icon file
IsValid() Returns true if the BitMap object is valid
IsIcon() Returns true if the BitMap object is a valid icon image, and false if not
Name() Returns the name of the BitMap image
Width() Returns the width of the BitMap image
Height() Returns the height of the BitMap image
Display() Reference to Display object where BitMap was created

BitMap Constants

Constant Data Item Data Type Value
BitMap.BitMapFile int 1
BitMap.IconFile int 2

Derived Classes

See Also

 


BitMap()

public method BitMap(int InternalBitMapId, Display BMDisplay = null)

Parameters

InternalBitMapId

Id of internal bitmap image

BMDisplay

Display object where BitMap is created (null is default)

Return Value

None

Description

Constructor for the BitMap class. This implementation uses an Id value which can range from 1 to 41, and these Ids correspond to a variety of simple images such as arrows in different directions. Numbers 39 through 41 correspond to the Aztec Compass Logo (39) and two a-Z-tec "Z" icons - one is adobe on steel blue (40) and the other is steel blue on adobe (41).

 

The optional BMDisplay argument can be used to create the bitmap on another (remote) Display. The default value of null refers to the local Display. A bitmap can only be used on the Display where it is created. A DisplayException will be fired if the bitmap is used with the wrong Display.

 

BitMap Class


BitMap()

public method BitMap(int ImageType, string FileName, int Width, int Height, Display BMDisplay = null)

Parameters

ImageType

Either IconFile or BitMapFile

FileName

File name containing the bitmap or icon definition

Width

Width of the resultant bitmap desired

Height

Height of the resultant bitmap desired

BMDisplay

Display object where BitMap is created (null is default)

Return Value

None

Description

Constructor for the BitMap class. This implementation reads the bitmap information from the specified file based on the image type. The method supports ".bmp" files (BitMapFile) and ".ico" files (IconFile). The optional BMDisplay arrgument can be used to create the bitmap on another (remote) Display. The default value of null refers to the local Display. A bitmap can only be used on the Display where it is created. A DisplayException will be fired if the bitmap is used with the wrong Display.

 

An icon image can actually contain multiple separate images, such as 16 x 16 pixels and 32 x 32 pixels, and is particularly useful for displaying in a Frame or Dialog window's title bar.

 

BitMap Class


IsValid()

public method<bool> IsValid()

Parameters

None

Return Value

Returns true if bitmap is valid

Description

This method returns true if the bitmap is valid and false if the bitmap is not valid (based on invalid Id or invalid file name).

 

BitMap Class


IsIcon()

public method<bool> IsIcon()

Parameters

None

Return Value

Returns true if bitmap is an icon

Description

This method returns true if the bitmap is a valid icon image. An icon image can actually contain multiple separate images, such as 16 x 16 pixels and 32 x 32 pixels. It can be attachehd to a Frame or DIalog (using SetIcon()) and the windowing system displays the icon in the windows title bar. The 32x32 image may also be displayed in the operating system task bar, if applicable.

 

BitMap Class


Name()

public method<string> Name()

Parameters

None

Return Value

Returns the bitmap name

Description

This method returns the name corresponding to the bitmap. If read in from a file, the file name will be returned, otherwise a string representation of the image Id is returned.

 

BitMap Class


Width()

public method<int> Width()

Parameters

None

Return Value

Returns width of image

Description

This method returns the width (in pixels) of the image specified by this BitMap object. Note that if the image is actually an icon, which can itself consist of multiple images, a value of zero is currently returned for the width.

 

BitMap Class


Height()

public method<int> Height()

Parameters

None

Return Value

Returns height of image

Description

This method returns the height (in pixels) of the image specified by this BitMap object. Note that if the image is actually an icon, which can itself consist of multiple images, a value of zero is currently returned for the height.

 

BitMap 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 BitMap 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 BitMap resource is created within the context of a Display, and it can only be used with that Display. If a BitMap is used with a Display where it was not created, a DisplayException will be fired.

 

BitMap Class

 

Copyright © 2010-2017

Aztec Development Group

All Rights Reserved

Download Aztec