AppleCGMutablePath - UBogun/Xojo-iosLib GitHub Wiki
Inherits from AppleCGPath
Memory leak check: not yet done
Status: Complete
This is the mutable subclass of a CGPath. Whenever you want to modify a path, you should use this class.
##Constructors Constructor(): Creates a new, empty mutable CGPath.
Constructor (Path As AppleCGPath): Creates a new mutable from an immutable CGPath.
##Methods
AddArc (X as double, Y as double, Radius as double, StartAngle as Double, EndAngle As Double, ClockWise As Boolean, opt. aTransform As CGAffineTransform): Appends an arc to the graphics path, possibly preceded by a straight line segment.
X and Y define the center point of the arc in path coordinates, Radius being the radius. StartAngle and EndAngle are angles in radians defining start- and endpoints of the arc, measured on the x axis. ClockWise defines whether the path is drawn in clockwise or counterclockwise direction before an optional CGAffineTransform is added to it.
AddArcToPoint (x1 as double, y1 as double, x2 as double, y2 as double, radius as double, opt. aTransform As CGAffineTransform): Another way to add an arc, using a sequence of cubic Bézier curves to create an arc that is tangent to the line from the current point to (x1,y1) and to the line from (x1,y1) to (x2,y2). The start and end points of the arc are located on the first and second tangent lines, respectively. The start and end points of the arc are also the “tangent points” of the lines.
AddCurveToPoint (cp1x as double, cp1y as double, cp2x as double, cp2y as double, x as double, y as double, opt. Transform as CGAffineTransform): Appends a cubic Bézier curve to the path using the two control points cp1 and cp2. x and y are the coordinates of the endpoint.
AddEllipse (Rect As NSRect, opt. Transform as CGAffineTransform): Appends an ellipse to the path that bounds are defined by the Rect.
AddLines (PointArray As AppleArray, opt. count as Uinteger, opt. Transform as CGAFFineTransform): A conveneince method for adding a whole Array of points to the path. Count is an optional value defining how many points to retrieve from the array, starting at index 0.
AddLineToPoint (X as double, Y as double, opt. aTransform As CGAffineTransform): Appends a line segment from CurrentPoint to the position defined by x and y.
AddPath (Path As AppleCGPath, opt. aTransform As CGAffineTransform): Appends a path to the current path.
AddQuadCurvetoPoint (cpx as double, cpy as double, x as double, y as double, opt. aTransform as CGAffineTransform): Adds a quadratic Bézier curve to a path with cp being the control point and x and y defining the end point.
AddRect (aRect as NSRect, opt. aTransform as CGAffineTransform): Adds A Rectangle to the path.
AddRects (Rects As AppleArray, opt. Count As UInteger = 0, opt. aTransform as CGAffineTransform): Adds an array of rectangles to the path. Count limits the the number of rectangles to pass.
AddRelativeArc (x as double, y as double, radius as double, startAngle as Double, Delta as Double, opt. atransform as CGAffineTransform): And another way to add an arc to the point, this time with X and Y being the center point of the arc, radius, startAngle and Delta being radians values, the latter defining the distance the arc should travel.
AddRoundedRect (aRect as NSRect, CornerWidth as Double, CornerHeight as Double, opt. aTransform as CGAffineTransform): Adds a rounded rectangle with the specified corner parameters to the path.
Copy(opt. Transform as CGAffineTransform) As AppleCGMutablePath: Returns a copy of the path. If you supply a CGAfineTransform structure, the path copy is transformed.
CloseSubpath(): Does exactly that.
MoveToPoint (x as double, y as double, opt. aTransform as CGAffineTransform): Starts a new subpath at the location x,y.