imagine-hussain / rust-ws1

workshop01

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

  • For each of the below, take in a file name (how you do this is your choice), and if it doesn't exist, create a bmp. If it does exist but isn't a valid BMP, return an error. If it does exist and is a BMP, overwrite it." Draw a single pixel of any color, anywhere on the image.
  • "Draw a diagonal line of any color, across one diagonal of a square canvas. Error if the canvas is not square." - hussein
  • Draw an X shape of any color, across the whole of a canvas. Draw a house shape. - ray
  • "Draw the outline of a square on a canvas. The width and coordnates of the square should be specified by the user." - michael
  • "Draw a filled-in square on a canvas. The outline should be a different colour to the filling." - michael
  • Draw a 600x1000 rainbow flag across the entirety of a canvas. - ollie
  • Draw a 110x180pixel flag of Finland. - ollie
  • Draw a 200x100 pixel flag of Iceland - ollie
  • Draw a 200x100 pixel Aboriginal Flag - ollie
  • "Draw the plot of a sine wave that's 20 pixels high, across the center of an image." - hussein
  • "For each of the below, take in two files called f1 and f2 (how you do this is your choice). If either don't exist or aren't valid, throw an error."
  • "If f1 and f2 have the same dimensions; write to f1 a pixel-wise average of the two. Otherwise print an appropriate error message."
  • "If f1 and f2 ave te same dimensions; print the first row of the first; then the second row of the second, then the first row of the third." Copy f1 on top of f2. If f1 does not fit inside f2, print an appropriate error message

Functions we need

  • File Opening
  • Draw Pixel
  • Draw line (horizontal)
  • Draw line (diagonal)
  • Draw line (start + end point)

About

workshop01


Languages

Language:Rust 100.0%