Language Reference Guide : 4. System Classes : BitmapObject Class
 
Share this page                  
BitmapObject Class
The BitmapObject class represents objects that are bitmaps. The bitmaps can be either two-color or full-color, and support transparency wherever the underlying format allows this. A wide range of formats are supported. You can useImageFields, ImageTrim fields, ButtonFields, or PaletteFields to display BitmapObjects as the principal element. You can incorporate BitmapObjects as icons in ToggleFields, TreeViewFields, ListViewFields, and TabFolders. They can be used as background patterns for any form field, including the form itself.
Each BitmapObject can contain either a single image or multiple alternative images, as well as a collection of iconic images (sprites) that can be overlaid onto the bitmap when used as a field's background. For more information about how to create and use multi-image BitmapObjects, see the ComposeBitmap Method, the UpdField Method, and the SpriteDescriptor Class.
OpenROAD defines attributes and methods for BitmapObjects that let you read images from files and the database, or to write or update images in the database or files. BitmapObjects can also be stored within any OpenROAD component (such as Frames or UserClasses). BitmapObjects let you move arbitrarily sized, portable images into and within a database with minimum programming effort.
Additional methods allow BitmapObjects to be modified at runtime, enabling the intrinsic mapping, mobile, and hotspot capabilities to be extended.
For more information about using bitmap images in an application, see the Programming Guide.
BitmapObjects in the Frame Source
All FormFields have BitmapObject attributes to enable them to have bitmapped backgrounds or foregrounds, or to display icon images. Typical attributes are FgBitmap, BgBitmap, BitmapLabel. When the frame is saved, such BitmapObjects are saved with the fields. TaggedValue Items can also be BitmapObjects, and be saved with the frame.
BitmapObject Attributes and Methods Affecting the Frame Source
To optimize performance, BitmapObjects stored in a frame's source are actually displayed through an intermediate platform-specific, object; they are not themselves duplicated into the running frame.
Note:  This has no implications for your use of BitmapObjects in imaged applications, for example, production applications or included imaged applications.
However, it is relevant to applications that are run unimaged from Workbench during development: while you are developing, if your frame code includes any methods or attribute changes that change the BitmapObject itself, execution of these on a framesource-originating BitmapObject will affect your frame's source, and when you save the frame in Workbench those changes will be saved too. You can avoid this by either duplicating the BitmapObject in your code and applying the change to the duplicate, or choosing File, Revert to Last Saved whenever you test-run that frame and trigger such a change.
The following is a list of relevant attributes and methods:
Changes affecting only the attribute itself:
Any changes to the Marker attribute (the actual image will not be affected)
Changes affecting the actual image stored in the BitmapObject:
All changes to FileHandle or DBHandle attributes
Calls to BlankBitmap, CaptureBitmap, CornerBitmap, ComposeBitmap, FillBitmap, GradientBitmap, LoadLong, ReplaceBitmap, SetPixelColor.
Inherits From
Object Class
Inherited By
CursorBitmap
Attributes
DBHandle
ErrorStatus
FileHandle
HeightPixels
ImageIndex
Marker
Picture
WidthPixels
Methods
BlankBitmap
CaptureBitmap
CornerBitmap
DeleteFromDB
Elements
ExtractBitmap
FillBitmap
FormatBitmap
GetDisplayedElement
GetPixelColor
GradientBitmap
InsertIntoDB
LoadLong
LocateBitmap
OrientBitmap
ReplaceBitmap
ReplaceTransparency
ResizeBitmap
SetPixelColor
UpdateInDB
WriteToFile