PaintingFragment
@objcMembers
@objc(PESDKPaintingFragment)
open class PaintingFragment : NSObject
A PaintingFragment
holds the data to redraw a certain part of a Painting
. This is mainly
used for fast and efficient undo and redo.
-
The rectangle of the painting that this fragment represents.
Declaration
Swift
public let bounds: CGRect
-
The size of the saved data.
Declaration
Swift
public let dataLength: Int
-
The bitmap data that belongs to this fragment. This is stored on disk and retrieved when needed.
Declaration
Swift
open var data: Data { get }
-
Creates a new
PaintingFragment
with the given data and for the given bounds.Declaration
Swift
public init(data: Data, bounds: CGRect)
Parameters
data
The bitmap data that belongs to this fragment.
bounds
The rectangle of the painting that this fragment represents.
-
Applies the bitmap data of this fragment in the given painting.
Declaration
Swift
open func apply(in painting: Painting)
Parameters
painting
The painting to apply this fragment in.