LitDev Extension API

LD3DView LDArray LDBits LDBlueTooth LDCall
LDChart LDClient LDClipboard LDColours LDCommPort
LDController LDControls LDCursors LDDataBase LDDateTime
LDDebug LDDialogs LDDictionary LDEffect LDEmail
LDEncryption LDEvents LDFastArray LDFastShapes LDFigures
LDFile LDFocus LDftp LDGraph LDGraphicsWindow
LDHID LDImage LDInline LDIOWarrior LDList
LDLogic LDMath LDMathX LDMatrix LDMusic
LDNetwork LDPhysics LDProcess LDQueue LDRegex
LDResources LDScrollBars LDSearch LDServer LDSettings
LDShapes LDShell LDSort LDSound LDSpeech
LDStatistics LDStopwatch LDText LDTextWindow LDTimer
LDTranslate LDUnits LDUtilities LDWaveForm LDWebCam
LDWindows LDxml LDZip

LDFastShapes
Shape methods which are faster than standard Small Basic Shape operations.
This is primarily for shape movement when there are a large number of shapes updated in a game loop.
Only the main Shapes commands are supported since these are the ones that are commonly repeated many times.
The shape must first be created, then registered (ShapeIndex) and the returned integer index used with the other methods.
The visual update of the changes made does not happen until (Update) is called when all changes are processed together.
Performance improvements come from both integer indexing and batch update.


GetLeft GetOpacity GetTop
HideShape Move Rotate
SetOpacity ShapeIndex ShowShape
Update Zoom

GetLeft(index)
Gets the left co-ordinate of the specified shape.
index The index (returned by ShapeIndex) of the shape.
returns The left co-ordinate of the shape.

GetOpacity(index)
Gets the opacity of a shape.
index The index (returned by ShapeIndex) of the shape.
returns The opacity of the object as a value between 0 and 100. 0 is completely transparent and 100 is completely opaque.

GetTop(index)
Gets the top co-ordinate of the specified shape.
index The index (returned by ShapeIndex) of the shape.
returns The top co-ordinate of the shape.

HideShape(index)
Hides an already added shape.
index The index (returned by ShapeIndex) of the shape.

Move(index,x,y)
Moves the shape with the specified name to a new position.
index The index (returned by ShapeIndex) of the shape to move.
x The x co-ordinate of the new position.
y The y co-ordinate of the new position.

Rotate(index,angle)
Rotates the shape with the specified name to the specified angle.
index The index (returned by ShapeIndex) of the shape.
angle The angle to rotate the shape.

SetOpacity(index,level)
Sets how opaque a shape should render.
index The index (returned by ShapeIndex) of the shape.
level The opacity level ranging from 0 to 100. 0 is completely transparent and 100 is completely opaque.

ShapeIndex(shapeName)
Register a shape for use with this object.
This command is potentially slow, so should be called before time critical visual updates occur.
i.e. Create and register all shapes before motion is simulated.

shapeName The name of the created shape.
returns An index to use in the other methods in this object.
The index is an integer starting at 1, incremented for each shape registered.
-1 for an error.


ShowShape(index)
Shows a previously hidden shape.
index The index (returned by ShapeIndex) of the shape.

Update()
Update all of the properties of shapes set by this object that have been modifed since the last update.
The shapes are not visually updated until this method is called.


Zoom(index,scaleX,scaleY)
Scales the shape using the specified zoom levels.
index The index (returned by ShapeIndex) of the shape.
scaleX The x-axis zoom level.
scaleY The y-axis zoom level.