PathModel
@available(iOS 9.0, *)
public struct PathModel : SpriteModel, Equatable
A PathModel
holds information about a single path within a BrushSpriteModel
.
-
The color of the path.
Declaration
Swift
public let color: UIColor
-
The normalized size of the path, relative to the smaller side of the image.
Declaration
Swift
public let normalizedSize: CGFloat
-
The hardness of the path. This is a value between 0.0 (very soft) and 1.0 (very hard).
Declaration
Swift
public let hardness: CGFloat
-
The points of the path. These are normalized coordinates, where
x
is relative to the width of the untransformed image andy
is relative to the height of the untransformed image. The origin is at the top left of the untransformed image.Declaration
Swift
public let points: [CGPoint]
-
The
PaintingFragment
that can be applied for this path to be erased, if available.Declaration
Swift
public var eraseFragment: PaintingFragment?
-
The
PaintingFragment
that can be applied for this path to be drawn, if available.Declaration
Swift
public var drawFragment: PaintingFragment?