BrushSpriteModel

@available(iOS 9.0, *)
public struct BrushSpriteModel : SpriteModel, Equatable

A BrushSpriteModel holds information about a brush that should be added to an image.

  • The paths that belong to this brush sprite.

    Declaration

    Swift

    public var paths: [PathModel]
  • Searches for a PathModel with the given UUID.

    Declaration

    Swift

    public func pathModel(with uuid: UUID) -> (Int, PathModel)?

    Parameters

    uuid

    The UUID of the path model to search for.

    Return Value

    A tuple with the index of the path model within the path model array and the path model if it is found, nil otherwise.

  • Creates a new BrushSpriteModel with an empty paths array.

    Declaration

    Swift

    public init()
  • Creates a new BrushSpriteModel with the given paths.

    Declaration

    Swift

    public init(paths: [PathModel])

    Parameters

    paths

    The paths of the brush that should be added to an image.