LukaszBaldyga

Drawing Program

Drawing created with the program

This C# drawing program uses a custom language to create shapes and patterns. I built it for my third-year university software engineering assignment.

You can download the demo executable or browse the source on my Gitea. It should run under Wine, though I encountered problems with the file locator.

Custom language

I designed the language to meet the assignment requirements. I received 100% of the available marks. The requirements included:

  • Drawing basic shapes and lines, such as circles and squares.
  • Storing and retrieving variables.
  • Flow control, including if statements.
  • Methods and functions with and without parameters; recursion was not required.
  • Loading and unloading programs.
  • Error detection.

Gallery

1 / 4

Documentation

Each class has documentation explaining its use and role in the program. I generated the project documentation with Doxygen.

Videos

I recorded two walkthroughs of the project and its code for the assignment. Watch the first walkthrough and second walkthrough below.

Example with code

1 / 2

Code

var x = 0
var y = 0
var offset = 128

while x < offset 
  y = 0
  while y < offset 
    move x, y
    pen x, y, x + y
    dot
    y = y + 1
  end
  y = 0
  while y < offset 
    move x + offset, y
    pen y + x, y, x
    dot
    y = y + 1
  end
  x = x + 1
end

x = 0
while x < offset 
  y = 0
  while y < offset 
    move x, y + offset, 
    pen y + x, offset - y, offset - x
    dot
    y = y + 1
  end
  y = 0
  while y < offset 
    move x + offset, y + offset
    pen x + y, offset - x, offset - y
    dot
    y = y + 1
  end
  x = x + 1
end