// midterm_structure.cpp - midterm structure
#include <iostream>
#include <fstream>
#include <math.h> 
#include "rawdraw.h"
using namespace std;


void initArray(unsigned char col, unsigned char img[]) {

  for(int i=0;i<WIDTH*HEIGHT;i++) {
    img[i] = col;
  }

}

int iround(double x)
{
  return (int)floor(x + 0.5);
}

void drawHLine(int xp, int yp, int length, unsigned char col, unsigned char img[]) {

  for(int x=xp;x<xp+length;x++) {
    img[yp*WIDTH + x] = col;
  }

}

