CanvasIO.cropArea

Set an area the shapes can be drawn in. Any shape drawn after this call will be cropped to fit the specified rectangle on the canvas.

Calling this again will replace the old area. resetCropArea can be called to remove this area.

  1. Optional!Rectangle cropArea()
  2. void cropArea(Rectangle area)
  3. void cropArea(Optional!Rectangle area)
    interface CanvasIO
    final nothrow
    void
    cropArea
    (
    Optional!Rectangle area
    )

Parameters

area Optional!Rectangle

Area on the canvas to restrict all subsequently drawn shapes to. If passed an empty Optional, calls resetCropArea.

Meta