BBjImage::getImageSlice

Description

In BBj 5.0 and higher, this method returns a new BBjImage as a slice of another BBjImage.

Syntax

Return Value

Method

BBjImage

getImageSlice(int index, int width)

Parameters

Variable

Description

index

Zero-based index of the slice within the original BBjImage.

width

Width of each image slice.

Return Value

Returns a new BBjImage object which is a slice of the original BBjImage object.

Remarks

None.

Example

rem 'Get a BBjImage slice from a BBjImage

rem 'Obtain the instance of the BBjAPI object
let myAPI! = BBjAPI()

rem 'Open the SysGui device
SYSGUI = UNT
OPEN (SYSGUI)"X0"

rem 'Obtain an instance of the BBjSysGui object
let mySysGui! = myAPI!.getSysGui()

rem 'Obtain an instance of the BBjImageManager object
myImageManager! = mySysGui!.getImageManager()

rem 'Load an image from a file
myImage! = myImageManager!.loadImageFromFile("bbj.ico")

rem 'Slice off part of a BBjImage
mySlice! = myImage!.getImageSlice(0,8)

See Also

BBjAPI

BBjSysGui

BBjControl

BBjWindow

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.