MoveTo
internal struct MoveTo : PathCommand
The PathCommand
that corresponds to the SVG M
or m
command
-
This will move the current point to
CGPoint(self.coordinateBuffer[0], self.coordinateBuffer[1])
.Sequential MoveTo commands should be treated as LineTos.
From Docs (https://www.w3.org/TR/SVG2/paths.html#PathDataMovetoCommands):
Start a new sub-path at the given (x,y) coordinates. M (uppercase) indicates that absolute coordinates will follow; m (lowercase) indicates that relative coordinates will follow. If a moveto is followed by multiple pairs of coordinates, the subsequent pairs are treated as implicit lineto commands. Hence, implicit lineto commands will be relative if the moveto is relative, and absolute if the moveto is absolute.
Declaration
Swift
internal func execute(on path: UIBezierPath, previousCommand: PreviousCommand? = nil)