#include "graphics.h" #include "sed1335.h" #include "math.h" // draws only vertical or horizontal lines void line (unsigned short x1, unsigned short y1, unsigned short len, unsigned char dir) { unsigned short i; if (dir == HORIZONTAL) { for(i=0;i<=len;i++) { SED1335_pixel_on(x1+i,y1); } } else { for(i=0;i<=len;i++) { SED1335_pixel_on(x1,y1+i); } } } // end line () void rectangle (unsigned short x1, unsigned short y1, unsigned short width, unsigned short height) { line(x1,y1,width,HORIZONTAL); line(x1,y1,height,VERTICAL); line(x1,y1+height,width,HORIZONTAL); line(x1+width,y1,height,VERTICAL); }