Child pages
  • Shapes - an introductory MPS tutorial

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Now you should try yourself to create a concept for square. Simply repeat the steps we did for Circle, just create different properties - upperLeftX and upperLeftY to hold the coordinates of the upper-left corner followed by size to specify the length of the sides of the square. Ultimately you should get to this:

Do not forget to extend the Shape concept on the first line. You may have noticed that while the completion menu (Control + Space) is displayed, you can still type characters and they will be used to filter out the entries available in the completion menu.


Having created two shapes we can move on defining a concept to hold them all in a painting. We'll create another concept, called Canvas, that will represent a scene composed of shapes. The user will be able to create multiple scenes (Canvasses), which will be mutually independent and will not share shapes. Each Canvas will hold a name and a list of shapes that it contains.