Implemented clipping and text drawing routines