Modify drawing function.