added drawrect example to main.cc