Advanced Software Engineering
Advanced_Software_Engineering.Drawer Class Reference

The drawer is responsible for drawing on the graphics object. More...

Public Member Functions

 Drawer (Graphics graphics)
 Creates a new drawer object. More...
 
void ResetDrawer ()
 Restart the drawer. More...
 
void SetGraphics (Graphics graphics)
 Set thhe graphics context. More...
 
void MovePen (Point point)
 Move the pen to the point. More...
 
Point GetPenPosition ()
 Returns the current pen position More...
 
bool GetFill ()
 Get current fill status More...
 
void EnableFill ()
 Allows the filling of objects. More...
 
void DisableFill ()
 Disables the filling of objects. More...
 
void SetFill (bool fill)
 Set the filling of objects More...
 
void SetPenColor (Color color)
 Set the pen color More...
 
void SetPenWidth (float width)
 Set the width of the pen More...
 
void SetFillColor (Color color)
 Set fill color More...
 
void DrawLine (Point point)
 Draws a line from the current pen position to the one specified in the parameter. This also sets the pens new position. More...
 
void DrawLines (Point[] points)
 Draws multiple lines to multiple points. This doesn't change the pens position. More...
 
void DrawLines (GraphicsPath path)
 Draws multiple lines to multiple points. This doesn't change the pens position. More...
 
void DrawCircle (double scale)
 Draws a circle of a scale ath the pen's position More...
 
void ClearCanvas ()
 Clears the canvas More...
 
void DrawDot ()
 Draws a single pixel with the pen's color at the pen's position. More...
 
ValueStorage GetValueStorage ()
 Gets the valueStorage object More...
 

Public Attributes

List< IVerbChunkverbChunks = new List<IVerbChunk>()
 List of verbChunks used to create for loops, if statements, while loops and methods. See ForChunk, IfChunk, MethodChunk, WhileChunk and

See also
IVerbChunk

. More...

 
bool verbChunkGeneratingMethod = false
 A veriable that represents wether the last verbchunk is a method. See MethodChunk More...
 
Dictionary< string, MethodChunkMethods = new Dictionary<string, MethodChunk>()
 A list of methods. See MethodChunk More...
 

Protected Attributes

bool fill = false
 Weather enclosed spaces will have fill. More...
 
SolidBrush brush
 The Brush object More...
 
Pen pen
 The Pen object More...
 
Point penPosition
 The current position of the pen. More...
 
Graphics graphics
 The graphics object More...
 

Static Protected Attributes

static Color defaultColor = Color.Black
 The starting color of the pen / brush More...
 
static float defaultWidth = 1f
 The deafult width of the pen More...
 

Detailed Description

The drawer is responsible for drawing on the graphics object.

Constructor & Destructor Documentation

◆ Drawer()

Advanced_Software_Engineering.Drawer.Drawer ( Graphics  graphics)

Creates a new drawer object.

Parameters
graphicsGraphics context

Member Function Documentation

◆ ClearCanvas()

void Advanced_Software_Engineering.Drawer.ClearCanvas ( )

Clears the canvas

◆ DisableFill()

void Advanced_Software_Engineering.Drawer.DisableFill ( )

Disables the filling of objects.

◆ DrawCircle()

void Advanced_Software_Engineering.Drawer.DrawCircle ( double  scale)

Draws a circle of a scale ath the pen's position

Parameters
scaleScale of the circle

◆ DrawDot()

void Advanced_Software_Engineering.Drawer.DrawDot ( )

Draws a single pixel with the pen's color at the pen's position.

◆ DrawLine()

void Advanced_Software_Engineering.Drawer.DrawLine ( Point  point)

Draws a line from the current pen position to the one specified in the parameter. This also sets the pens new position.

Parameters
pointDraw to point

◆ DrawLines() [1/2]

void Advanced_Software_Engineering.Drawer.DrawLines ( GraphicsPath  path)

Draws multiple lines to multiple points. This doesn't change the pens position.

Parameters
pathGraphicsPath to draw to

◆ DrawLines() [2/2]

void Advanced_Software_Engineering.Drawer.DrawLines ( Point[]  points)

Draws multiple lines to multiple points. This doesn't change the pens position.

Parameters
pointsPoints to draw to

◆ EnableFill()

void Advanced_Software_Engineering.Drawer.EnableFill ( )

Allows the filling of objects.

◆ GetFill()

bool Advanced_Software_Engineering.Drawer.GetFill ( )

Get current fill status

Returns
current fill satus

◆ GetPenPosition()

Point Advanced_Software_Engineering.Drawer.GetPenPosition ( )

Returns the current pen position

Returns
The curren pen position

◆ GetValueStorage()

ValueStorage Advanced_Software_Engineering.Drawer.GetValueStorage ( )

Gets the valueStorage object

Returns

◆ MovePen()

void Advanced_Software_Engineering.Drawer.MovePen ( Point  point)

Move the pen to the point.

Parameters
pointPosition to move the pen to

◆ ResetDrawer()

void Advanced_Software_Engineering.Drawer.ResetDrawer ( )

Restart the drawer.

◆ SetFill()

void Advanced_Software_Engineering.Drawer.SetFill ( bool  fill)

Set the filling of objects

Parameters
fillSet fill

◆ SetFillColor()

void Advanced_Software_Engineering.Drawer.SetFillColor ( Color  color)

Set fill color

Parameters
colorFill color

◆ SetGraphics()

void Advanced_Software_Engineering.Drawer.SetGraphics ( Graphics  graphics)

Set thhe graphics context.

Parameters
graphics

◆ SetPenColor()

void Advanced_Software_Engineering.Drawer.SetPenColor ( Color  color)

Set the pen color

Parameters
colorPen color

◆ SetPenWidth()

void Advanced_Software_Engineering.Drawer.SetPenWidth ( float  width)

Set the width of the pen

Parameters
widthPen width

Member Data Documentation

◆ brush

SolidBrush Advanced_Software_Engineering.Drawer.brush
protected

The Brush object

◆ defaultColor

Color Advanced_Software_Engineering.Drawer.defaultColor = Color.Black
staticprotected

The starting color of the pen / brush

◆ defaultWidth

float Advanced_Software_Engineering.Drawer.defaultWidth = 1f
staticprotected

The deafult width of the pen

◆ fill

bool Advanced_Software_Engineering.Drawer.fill = false
protected

Weather enclosed spaces will have fill.

◆ graphics

Graphics Advanced_Software_Engineering.Drawer.graphics
protected

The graphics object

◆ Methods

Dictionary<string, MethodChunk> Advanced_Software_Engineering.Drawer.Methods = new Dictionary<string, MethodChunk>()

A list of methods. See MethodChunk

◆ pen

Pen Advanced_Software_Engineering.Drawer.pen
protected

The Pen object

◆ penPosition

Point Advanced_Software_Engineering.Drawer.penPosition
protected

The current position of the pen.

◆ verbChunkGeneratingMethod

bool Advanced_Software_Engineering.Drawer.verbChunkGeneratingMethod = false

A veriable that represents wether the last verbchunk is a method. See MethodChunk

◆ verbChunks

List<IVerbChunk> Advanced_Software_Engineering.Drawer.verbChunks = new List<IVerbChunk>()

List of verbChunks used to create for loops, if statements, while loops and methods. See ForChunk, IfChunk, MethodChunk, WhileChunk and

See also
IVerbChunk

.


The documentation for this class was generated from the following file: