PictureRecorder

public final class PictureRecorder

The picture recorder is used to record drawing operations made to a SKCanvas and stored in a SKPicture. call the beginRecording method to start, issue your commands into the returned Canvas and then call the endRecording method to get the Picture that has the recording on it.

  • Creates a new instance of the SKPictureRecorder.

    Declaration

    Swift

    public init()
  • Start the recording process and return the recording canvas.

    Declaration

    Swift

    public func beginRecording(cullRect: Rect) -> Canvas

    Parameters

    cullRect

    The culling rectangle for the new picture.

    Return Value

    a Canvas that you can issue draw operations on, and that will be recorded

  • Signal that the caller is done recording.

    Declaration

    Swift

    public func endRecording() -> Picture

    Return Value

    the picture with the recording on it

  • Returns the recording canvas if one is active, or nil if recording is not active.

    Declaration

    Swift

    public var recordingCanvas: Canvas { get }