Platforms to show: All Mac Windows Linux Cross-Platform
Back to NSBezierPathMBS class.
NSBezierPathMBS.bezierPathByFlatteningPath as NSBezierPathMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Drawing | MBS MacBase Plugin | 12.5 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Returns a new path object whose contents are a flattened version of the receiver's path.
Flattening a path converts all curved line segments into straight line approximations. The granularity of the approximations is controlled by the path's current flatness value, which is set using the DefaultFlatness property.
NSBezierPathMBS.bezierPathByReversingPath as NSBezierPathMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Drawing | MBS MacBase Plugin | 12.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Returns a new path object whose contents are a reversed version of the receiver's path.
Reversing a path does not necessarily change the appearance of the path when rendered. Instead, it changes the direction in which path segments are drawn. For example, reversing the path of a rectangle (whose line segments are normally drawn starting at the origin and proceeding in a counterclockwise direction) causes its line segments to be drawn in a clockwise direction instead. Drawing a reversed path could affect the appearance of a filled pattern, depending on the pattern and the fill rule in use.
This method reverses each whole or partial subpath in the path object individually.
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Drawing | MBS MacBase Plugin | 12.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This method closes the current subpath by creating a line segment between the first and last points in the subpath. This method subsequently updates the current point to the end of the newly created line segment, which is also the first point in the now closed subpath.
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Drawing | MBS MacBase Plugin | 12.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
NSBezierPathMBS.containsPoint(p as NSPointMBS) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Drawing | MBS MacBase Plugin | 12.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
p: The point to test against the path, specified in the path object's coordinate system.
Returns true if the path's enclosed area contains the specified point; otherwise, false.
This method checks the point against the path itself and the area it encloses. When determining hits in the enclosed area, this method uses the non-zero winding rule (NSNonZeroWindingRule). It does not take into account the line width used to stroke the path.
NSBezierPathMBS.copy as NSBezierPathMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Drawing | MBS MacBase Plugin | 12.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
NSBezierPathMBS.curveToPoint(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, specified in the current coordinate system
controlPoint1: The point that determines the shape of the curve near the current point.
controlPoint2: The point that determines the shape of the curve near the destination 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.elementAtIndex(index as Integer) 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 |
index: The index of the desired path element.
Returns the type of the path element.
Path elements describe the commands used to define a path and include basic commands such as moving to a specific point, creating a line segment, creating a curve, or closing the path. The elements are stored in the order of their execution.
See also:
NSBezierPathMBS.elementAtIndex(index as Integer, byref associatedPoints() as NSPointMBS) 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 |
index: The index of the desired path element.
associatedPoints: On output, the data points associated with the specified path element.
Returns the type of the path element.
For curve operations, the order of the points is controlPoint1 (associatedPoints(0)), controlPoint2 (associatedPoints(1)), endPoint (associatedPoints(2)).
See also:
NSBezierPathMBS.elementCount 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 |
Each element type corresponds to one of the operations described in constants.
NSBezierPathMBS.flatness as Double
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa Drawing | MBS MacBase Plugin | 12.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
If no value is set, this method returns the default flatness value.
(Read and Write computed property)
NSBezierPathMBS.getLineDash(byref pattern() as Double, byref count as Integer, byref 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: On output, this array 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: On output, the number of entries written to pattern.
phase: On output, this value contains 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.isEmpty as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Drawing | MBS MacBase Plugin | 12.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
True if the receiver contains no path elements; otherwise, false.
NSBezierPathMBS.lineCapStyle as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa Drawing | MBS MacBase Plugin | 12.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
If this value is not set for the receiver, the default line cap style is returned.
(Read and Write computed property)
NSBezierPathMBS.lineJoinStyle as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa Drawing | MBS MacBase Plugin | 12.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
If this value is not set for the receiver, the default line join style is returned.
(Read and Write computed property)
NSBezierPathMBS.lineToPoint(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: The destination point of the line segment, specified in the current coordinate system.
This method creates a straight line segment starting at the current point and ending at the point specified by the aPoint parameter. The current point is the last point in the receiver's most recently added segment.
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.lineWidth as Double
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa Drawing | MBS MacBase Plugin | 12.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
The line width of the receiver, measured in points in the user coordinate space.
If no value was set explicitly for the receiver, this method returns the default line width.
(Read and Write computed property)
NSBezierPathMBS.miterLimit as Double
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa Drawing | MBS MacBase Plugin | 12.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
If no value is set, this method returns the default miter limit.
(Read and Write computed property)
NSBezierPathMBS.moveToPoint(p as NSPointMBS)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Drawing | MBS MacBase Plugin | 12.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
p: A point in the current coordinate system.
This method implicitly closes the current subpath (if any) and sets the current point to the value in p. When closing the previous subpath, this method does not cause a line to be created from the first and last points in the subpath.
For many path operations, you must invoke this method before issuing any commands that cause a line or curve segment to be drawn.
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.