A Paint Brush

Oct 03 2022 Computer Graphics Course Project C++ OpenGLUT

๐Ÿ”— See more details here.

Operating instructions

Use the keyboard to switch between various modes and the mouse to interact with the canvas. Each shape will automatically be assigned a random color.

  • โœ๏ธ Draw Points (d):

    Start drawing graphic when you press the left mouse button.
    Stop drawing graphic when you release the left mouse button.
  • ๐Ÿ“ Draw Lines (l):

    First click to assign the starting point.
    Second click to assign the ending point.
  • โšช Draw Circles (o):

    First click to assign the center of circle.
    Second click to assign the radius of circle.
  • ๐Ÿ”ท Draw Polygons (p):

    Left click to assign the coordinates of polygon.
    Right click to close the polygon.
  • ๐Ÿงน Clear (c):

    Press keyboard button c to clean the screen.
  • โ†ฉ๏ธ Undo (r):

    Press keyboard button r to undo the clean action.
    This feature only works after cleaning the screen.
  • โŒ Quit (q):

    Press keyboard button q to quit the window.

Result