Class Canvas
- Namespace
- BOOSE
- Assembly
- BOOSE.dll
Abstract class that implements CanvasInterface. See CanvasInterface documentation for what to implement. This class handles all the drawing on your system according to above documentation. BOOSE does not by default specify a default drawing Canvas (only this).
public class Canvas : ICanvas
- Inheritance
-
Canvas
- Implements
- Inherited Members
Constructors
Canvas()
public Canvas()
Fields
background_colour
protected Color background_colour
Field Value
Properties
PenColour
Get/Set the Pencolour for next drawing operation using a native colour datatype. Cast to relevant type.
public virtual object PenColour { get; set; }
Property Value
Xpos
X position of next drawing operation.
public virtual int Xpos { get; set; }
Property Value
Ypos
Y position of next drawing position
public virtual int Ypos { get; set; }
Property Value
Methods
Circle(int, bool)
Draw a circle at cursor position of radius.
public virtual void Circle(int radius, bool filled)
Parameters
Clear()
Fill the background in the default colour.
public virtual void Clear()
DrawTo(int, int)
Draw a line using the current pen from the last drawingf position to the specified position and move the cursor position to the provided x,y
public virtual void DrawTo(int x, int y)
Parameters
MoveTo(int, int)
Move the X and Y of the next drawing operation.
public virtual void MoveTo(int x, int y)
Parameters
Rect(int, int, bool)
Draw a rectangle at cursor position of width and height.
public virtual void Rect(int width, int height, bool filled)
Parameters
Rectangle(int, int, bool)
public virtual void Rectangle(int width, int height, bool filled)
Parameters
Reset()
Reset drawing cursor to 0,0 and reset pen to default.
public virtual void Reset()
Set(int, int)
Set output display size. This method should create whatever drawing display you intend to use of the size specified.
public virtual void Set(int width, int height)
Parameters
SetColour(int, int, int)
Set the pen colour using rgb values.
public virtual void SetColour(int red, int green, int blue)
Parameters
Tri(int, int)
Draw a triangle in the bounding rectangle.
public virtual void Tri(int width, int height)
Parameters
WriteText(string)
Draws text on the output window at the cursor position
public virtual void WriteText(string text)
Parameters
text
stringString to output
getBitmap()
Get the drawing Object of whatever native type. Returned a Object so it can be cast to native type. Use this to get native drawing type so that it can be displayed or output.
public virtual object getBitmap()