LitDev Extension API
GW
Alias for GraphicsWindow.
The GraphicsWindow provides graphics related input and output functionality. For example, using this class, it is possible to draw and fill circles and rectangles.
BackgroundColor
Gets or sets the Background color of the Graphics Window.
BrushColor
Gets or sets the brush color to be used to fill shapes drawn on the Graphics Window.
CanResize
Specifies whether or not the Graphics Window can be resized by the user.
Clear()
Clears the window.
DrawBoundText(x,y,width,text)
Draws a line of text on the screen at the specified location.
x The x co-ordinate of the text start point.
y The y co-ordinate of the text start point.
width The maximum available width. This parameter helps define when the text should wrap.
text The text to draw.
DrawEllipse(x,y,width,height)
Draws an ellipse on the screen using the selected Pen.
x The x co-ordinate of the ellipse.
y The y co-ordinate of the ellipse.
width The width of the ellipse.
height The height of the ellipse.
DrawImage(imageName,x,y)
Draws the specified image from memory on to the screen.
imageName The name of the image to draw.
x The x co-ordinate of the point to draw the image at.
y The y co-ordinate of the point to draw the image at.
DrawLine(x1,y1,x2,y2)
Draws a line from one point to another.
x1 The x co-ordinate of the first point.
y1 The y co-ordinate of the first point.
x2 The x co-ordinate of the second point.
y2 The y co-ordinate of the second point.
DrawRectangle(x,y,width,height)
Draws a rectangle on the screen using the selected Pen.
x The x co-ordinate of the rectangle.
y The y co-ordinate of the rectangle.
width The width of the rectangle.
height The height of the rectangle.
DrawResizedImage(imageName,x,y,width,height)
Draws the specified image from memory on to the screen, in the specified size.
imageName The name of the image to draw
x The x co-ordinate of the point to draw the image at.
y The y co-ordinate of the point to draw the image at.
width The width to draw the image.
height The height to draw the image.
DrawText(x,y,text)
Draws a line of text on the screen at the specified location.
x The x co-ordinate of the text start point.
y The y co-ordinate of the text start point.
text The text to draw
DrawTriangle(x1,y1,x2,y2,x3,y3)
Draws a triangle on the screen using the selected pen.
x1 The x co-ordinate of the first point.
y1 The y co-ordinate of the first point.
x2 The x co-ordinate of the second point.
y2 The y co-ordinate of the second point.
x3 The x co-ordinate of the third point.
y3 The y co-ordinate of the third point.
FillEllipse(x,y,width,height)
Fills an ellipse on the screen using the selected Brush.
x The x co-ordinate of the ellipse.
y The y co-ordinate of the ellipse.
width The width of the ellipse.
height The height of the ellipse.
FillRectangle(x,y,width,height)
Fills a rectangle on the screen using the selected Brush.
x The x co-ordinate of the rectangle.
y The y co-ordinate of the rectangle.
width The width of the rectangle.
height The height of the rectangle.
FillTriangle(x1,y1,x2,y2,x3,y3)
Draws and fills a triangle on the screen using the selected brush.
x1 The x co-ordinate of the first point.
y1 The y co-ordinate of the first point.
x2 The x co-ordinate of the second point.
y2 The y co-ordinate of the second point.
x3 The x co-ordinate of the third point.
y3 The y co-ordinate of the third point.
FontBold
Gets or sets whether or not the font to be used when drawing text on the Graphics Window, is bold.
FontItalic
Gets or sets whether or not the font to be used when drawing text on the Graphics Window, is italic.
FontName
Gets or sets the Font Name to be used when drawing text on the Graphics Window.
FontSize
Gets or sets the Font Size to be used when drawing text on the Graphics Window.
GetColorFromRGB(red,green,blue)
Constructs a color given the Red, Green and Blue values.
red The red component of the Color (0-255).
green The green component of the color (0-255).
blue The blue component of the color (0-255).
returns Returns a color that can be used to set the brush or pen color.
GetPixel(x,y)
Gets the color of the pixel at the specified x and y co-ordinates.
x The x co-ordinate of the pixel.
y The y co-ordinate of the pixel.
returns The color of the pixel.
GetRandomColor()
Gets a valid random color.
returns A valid random color.
Height
Gets or sets the Height of the graphics window.
Hide()
Hides the Graphics window.
KeyDown
Raises an event when a key is pressed down on the keyboard.
KeyUp
Raises an event when a key is released on the keyboard.
LastKey
Gets the last key that was pressed or released.
LastText
Gets the last text that was entered on the Graphics Window.
Left
Gets or sets the Left Position of the graphics window.
MouseDown
Raises an event when the mouse button is clicked down.
MouseMove
Raises an event when the mouse is moved around.
MouseUp
Raises an event when the mouse button is released.
MouseX
Gets the x-position of the mouse relative to the Graphics Window.
MouseY
Gets the y-position of the mouse relative to the Graphics Window.
PenColor
Gets or sets the color of the pen used to draw shapes on the Graphics Window.
PenWidth
Gets or sets the width of the pen used to draw shapes on the Graphics Window.
SetPixel(x,y,color)
Draws the pixel specified by the x and y co-ordinates using the specified color.
x The x co-ordinate of the pixel.
y The y co-ordinate of the pixel.
color The color of the pixel to set.
Show()
Shows the Graphics window to enable interactions with it.
ShowMessage(text,title)
Displays a message box to the user.
text The text to be displayed on the message box.
title The title for the message box.
TextInput
Raises an event when text is entered on the GraphicsWindow.
Title
Gets or sets the title for the graphics window.
Top
Gets or sets the Top Position of the graphics window.
Width
Gets or sets the Width of the graphics window.