Platforms to show: All Mac Windows Linux Cross-Platform
Back to NSBezierPathMBS class.
NSBezierPathMBS.relativeCurveToPoint(endPoint as NSPointMBS, controlPoint1 as NSPointMBS, controlPoint2 as NSPointMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Drawing | MBS MacBase Plugin | 12.5 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
endPoint: The destination point of the curve segment, interpreted as a relative offset from the current point.
controlPoint1: The point that determines the shape of the curve near the current point, interpreted as a relative offset from the current point.
controlPoint2: The point that determines the shape of the curve near the destination point, interpreted as a relative offset from the current point.
You must set the path's current point (using the moveToPoint method or through the creation of a preceding line or curve segment) before you invoke this method. If the path is empty, this method raises an NSGenericException exception.
NSBezierPathMBS.relativeLineToPoint(p as NSPointMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Drawing | MBS MacBase Plugin | 12.5 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
p: A point whose coordinates are interpreted as a relative offset from the current point.
The destination point is relative to the current point. For example, if the current point is (1, 1) and aPoint contains the value (1, 2), a line segment is created between the points (1, 1) and (2, 3).
You must set the path's current point (using the moveToPoint method or through the creation of a preceding line or curve segment) before you invoke this method. If the path is empty, this method raises an NSGenericException exception.
NSBezierPathMBS.relativeMoveToPoint(p as NSPointMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Drawing | MBS MacBase Plugin | 12.5 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
p: A point whose coordinates are interpreted as a relative offset from the current point.
This method implicitly closes the current subpath (if any) and updates the location of the current point. For example, if the current point is (1, 1) and aPoint contains the value (1, 2), the previous subpath would be closed and the current point would become (2, 3). When closing the previous subpath, this method does not cause a line to be created from the first and last points in the subpath.
You must set the path's current point (using the moveToPoint method or through the creation of a preceding line or curve segment) before you invoke this method. If the path is empty, this method raises an NSGenericException exception.
NSBezierPathMBS.removeAllPoints
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Drawing | MBS MacBase Plugin | 12.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
NSBezierPathMBS.setAssociatedPoints(points() as NSPointMBS, index as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Drawing | MBS MacBase Plugin | 12.5 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
points: An array containing up to three NSPointMBS data types. This parameter must contain the correct number of points for the path element at the specified index. Move, close path, and line segment commands require one point. Curve operations require three points.
index: The index of the path element you want to modify.
You can use this method to change the points associated with a path quickly and without recreating the path. You cannot use this method to change the type of the path element.
The following example shows you how you would modify the point associated with a line path element. The path created by this example results in a path with two elements. The first path element specifies a move to point (0, 0) while the second creates a line to point (100, 100). It then changes the line to go only to the point (50,50) using this method:
Note: If you specify too few points for a path element of type NSCurveToBezierPathElement, the behavior of this method is undefined.
NSBezierPathMBS.setLineDash(pattern() as Double, phase as Double)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Drawing | MBS MacBase Plugin | 12.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
pattern: An array of floating point values that contains the lengths (measured in points) of the line segments and gaps in the pattern. The values in the array alternate, starting with the first line segment length, followed by the first gap length, followed by the second line segment length, and so on
count: The number of values in pattern.
phase: The offset at which to start drawing the pattern, measured in points along the dashed-line pattern. For example, a phase of 6 in the pattern 5-2-3-2 would cause drawing to begin in the middle of the first gap.
NSBezierPathMBS.transformUsingAffineTransform(transform as Variant)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Drawing | MBS MacBase Plugin | 12.5 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Transform: The transform to apply to the path.
This method applies the transform to the path's points immediately. The following code translates a line from 0,0 to 100,100 to a line from 10,10 to 110,110.
transform must be a NSAffineTransformMBS object.
NSBezierPathMBS.windingRule as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa Drawing | MBS MacBase Plugin | 12.5 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Returns the winding rule for the path. This value may be either NSNonZeroWindingRule or NSEvenOddWindingRule.
This value overrides the default value returned by defaultWindingRule.
For more information on how winding rules affect the appearance of filled paths, see Constants.
(Read and Write computed property)
The items on this page are in the following plugins: MBS MacBase Plugin.