NewImage Routine

TURBU

NewImage Routine

 

Sets up a new on-screen image.

 

Syntax

 

function newImage(name: string; x, y: integer; zoom, transparency: word; pinned, mask: boolean): TRpgImage;

 

Description

 

This routine creates a new on-screen image, which is loaded from the file named in the name parameter.  No path or file extension is necessary; the engine will automatically search in the appropriate folders for on-screen images, and check all valid image extensions.

The image is centered around the point (x, y) on the screen.  The zoom parameter denotes what percentage of the image's original size it will be displayed as on-screen, and transparency is also a percent value, from 0 (completely opaque) to 100 (completely transparent and invisible.)  If true is passed to pinned, the image will be "pinned to the camera" and always remain in the same position on-screen.  Otherwise, it will be located on the map, and move on-screen when the map scrolls.  The mask parameter specifies whether or not to use a "mask color" for image transparency.

If name is not a valid filename, the image created will be invisible, with a size of 0x0.

 

Related topics

TRpgImage Class

This help file was created with the free trial version of HelpScribble.