Added ruler drawing code and basic drawingarea handling.