Drawing function debugging.