Contents

clear(_:)

Paints a transparent rectangle.

Declaration

func clear(_ rect: CGRect)

Parameters

  • rect:

    The rectangle, in user space coordinates.

Discussion

If the provided context is a window or bitmap context, Core Graphics clears the rectangle. For other context types, Core Graphics fills the rectangle in a device-dependent manner. However, you should not use this function in contexts other than window or bitmap contexts.

See Also

Drawing Shapes