fn clip_to_rectangle(cr: &Context, r: &Rect)