Up
Authors
- Enrico Sersale
-
Date: Generated at 2025-12-03
The NSBezierPath class
Copyright: (C) 1999, 2005 Free Software Foundation, Inc.
- Declared in:
- AppKit/NSBezierPath.h
- Conforms to:
- NSCoding
- NSCopying
Availability: OpenStep
Description forthcoming.
+ (
NSBezierPath*)
bezierPath;
Availability: OpenStep
Creates and returns an empty bezier path. Returns:
A new autoreleased NSBezierPath instance with no path
elements.
+ (
NSBezierPath*)
bezierPathWithOvalInRect: (
NSRect)aRect;
Availability: OpenStep
Creates an oval bezier path inscribed in the given
rectangle. aRect: The rectangle in which to
inscribe the oval Returns: A new autoreleased
NSBezierPath containing the oval
+ (
NSBezierPath*)
bezierPathWithRect: (
NSRect)aRect;
Availability: OpenStep
Creates a rectangular bezier path. aRect: The
rectangle to create the path from Returns: A new
autoreleased NSBezierPath containing the
rectangle
+ (
NSBezierPath*)
bezierPathWithRoundedRect: (
NSRect)aRect
xRadius: (CGFloat)xRadius
yRadius: (CGFloat)yRadius;
Availability: MacOS-X 10.5.0
Creates a rounded rectangle bezier path. aRect: The
rectangle to create the rounded path from
xRadius: The horizontal radius for the rounded
corners yRadius: The vertical radius for the
rounded corners Returns: A new autoreleased
NSBezierPath containing the rounded rectangle
+ (void)
clipRect: (
NSRect)aRect;
Availability: OpenStep
Sets the clipping region to the specified rectangle.
aRect: The rectangle to use as the clipping region
+ (CGFloat)
defaultFlatness;
Availability: OpenStep
Returns the default flatness for new bezier paths.
Returns: The current default flatness value
+ (
NSLineCapStyle)
defaultLineCapStyle;
Availability: OpenStep
Returns the default line cap style for new bezier
paths. Returns: The current default line cap style
+ (
NSLineJoinStyle)
defaultLineJoinStyle;
Availability: OpenStep
Returns the default line join style for new bezier
paths. Returns: The current default line join style
+ (CGFloat)
defaultLineWidth;
Availability: OpenStep
Returns the default line width for new bezier
paths. Returns: The current default line width
+ (CGFloat)
defaultMiterLimit;
Availability: OpenStep
Returns the default miter limit for new bezier
paths. Returns: The current default miter limit
value
+ (
NSWindingRule)
defaultWindingRule;
Availability: OpenStep
Returns the default winding rule for new bezier
paths. Returns: The current default winding rule
+ (void)
drawPackedGlyphs: (const char*)packedGlyphs
atPoint: (
NSPoint)aPoint;
Availability: OpenStep
Draws packed glyph data at the specified point.
packedGlyphs: The packed glyph data to draw
aPoint: The point at which to draw the glyphs
+ (void)
fillRect: (
NSRect)aRect;
Availability: OpenStep
Fills a rectangle using the default fill color.
aRect: The rectangle to fill
+ (void)
setDefaultFlatness: (CGFloat)flatness;
Availability: OpenStep
Sets the default flatness for new bezier
paths. flatness: The flatness value for
curve approximation
+ (void)
setDefaultLineCapStyle: (
NSLineCapStyle)lineCapStyle;
Availability: OpenStep
Sets the default line cap style for new bezier paths.
lineCapStyle: The line cap style for path
endpoints
+ (void)
setDefaultLineJoinStyle: (
NSLineJoinStyle)lineJoinStyle;
Availability: OpenStep
Sets the default line join style for new bezier paths.
lineJoinStyle: The line join style for path
corners
+ (void)
setDefaultLineWidth: (CGFloat)lineWidth;
Availability: OpenStep
Sets the default line width for new bezier paths.
lineWidth: The line width for stroked paths
+ (void)
setDefaultMiterLimit: (CGFloat)limit;
Availability: OpenStep
Sets the default miter limit for new bezier
paths. limit: The miter limit value (must
be >= 1.0)
+ (void)
setDefaultWindingRule: (
NSWindingRule)windingRule;
Availability: OpenStep
Sets the default winding rule for new bezier paths.
windingRule: The winding rule to use for fill
operations
+ (void)
strokeLineFromPoint: (
NSPoint)point1
toPoint: (
NSPoint)point2;
Availability: OpenStep
Using default stroke color and default drawing
attributes, draws a line between the two points
specified.
+ (void)
strokeRect: (
NSRect)aRect;
Availability: OpenStep
Using default stroke color and default drawing
attributes, strokes a rectangle using the
specified rect.
- (void)
addClip;
Availability: OpenStep
Intersects the current clipping region with the
area enclosed by the path.
- (void)
appendBezierPath: (
NSBezierPath*)aPath;
Availability: OpenStep
Appends all elements from another bezier path to
this path. aPath: The bezier path whose elements to
append
- (void)
appendBezierPathWithArcFromPoint: (
NSPoint)point1
toPoint: (
NSPoint)point2
radius: (CGFloat)radius;
Availability: OpenStep
Appends an arc that is tangent to two lines defined
by three points. point1: The first point defining the
first line point2: The second point (shared between
both lines) radius: The radius of the arc
- (void)
appendBezierPathWithArcWithCenter: (
NSPoint)center
radius: (CGFloat)radius
startAngle: (CGFloat)startAngle
endAngle: (CGFloat)endAngle;
Availability: OpenStep
Appends an arc to the path (counterclockwise by
default). center: The center point of
the arc radius: The radius of the arc
startAngle: The starting angle in degrees
endAngle: The ending angle in degrees
- (void)
appendBezierPathWithArcWithCenter: (
NSPoint)center
radius: (CGFloat)radius
startAngle: (CGFloat)startAngle
endAngle: (CGFloat)endAngle
clockwise: (BOOL)clockwise;
Availability: OpenStep
Appends an arc to the path with specified
parameters and direction. center: The
center point of the arc radius: The
radius of the arc startAngle: The starting
angle in degrees endAngle: The ending angle in
degrees clockwise: YES for
clockwise direction, NO for
counterclockwise
- (void)
appendBezierPathWithGlyph: (
NSGlyph)glyph
inFont: (
NSFont*)font;
Availability: OpenStep
Appends the outline of a single glyph to
the path. glyph: The glyph to append font:
The font containing the glyph
- (void)
appendBezierPathWithGlyphs: (
NSGlyph*)glyphs
count: (
NSInteger)count
inFont: (
NSFont*)font;
Availability: OpenStep
Appends the outlines of multiple glyphs
to the path. glyphs: Array of glyphs to
append count: Number of glyphs in the
array font: The font containing the
glyphs
- (void)
appendBezierPathWithOvalInRect: (
NSRect)aRect;
Availability: OpenStep
Appends an oval path inscribed in the given
rectangle. aRect: The rectangle in which to
inscribe the oval
- (void)
appendBezierPathWithPackedGlyphs: (const char*)packedGlyphs;
Availability: OpenStep
Appends glyph outlines from packed glyph data.
packedGlyphs: The packed glyph data
- (void)
appendBezierPathWithPoints: (
NSPoint*)points
count: (
NSInteger)count;
Availability: OpenStep
Appends a path connecting the given
points with straight lines. points: Array
of points to connect count: Number of
points in the array
- (void)
appendBezierPathWithRect: (
NSRect)aRect;
Availability: OpenStep
Appends a rectangular path to this path. aRect: The
rectangle to append
- (void)
appendBezierPathWithRoundedRect: (
NSRect)aRect
xRadius: (CGFloat)xRadius
yRadius: (CGFloat)yRadius;
Availability: MacOS-X 10.5.0
Appends a rounded rectangle to the path. aRect: The
rectangle to append xRadius: The horizontal
radius for the rounded corners yRadius: The vertical
radius for the rounded corners
- (
NSBezierPath*)
bezierPathByFlatteningPath;
Availability: OpenStep
Returns a flattened copy of the path with all
curves converted to line segments. Returns: A new
NSBezierPath with curves approximated by
straight lines
- (
NSBezierPath*)
bezierPathByReversingPath;
Availability: OpenStep
Returns a copy of the path with all subpaths
reversed. Returns: A new NSBezierPath with
reversed element order
- (
NSRect)
bounds;
Availability: OpenStep
Returns the smallest rectangle containing the
rendered path. Returns: The bounding rectangle of
the filled/stroked path
- (BOOL)
cachesBezierPath;
Availability: OpenStep
Returns whether the path caches its bezier path
data for performance. Returns: YES if
caching is enabled, NO otherwise
- (void)
closePath;
Availability: OpenStep
Closes the current subpath by drawing a straight
line to the starting point.
- (BOOL)
containsPoint: (
NSPoint)point;
Availability: OpenStep
Returns
YES iff the path contains,
according to the current
winding rule
, the given
point.
- (
NSRect)
controlPointBounds;
Availability: OpenStep
Returns the smallest rectangle containing all
control points. Returns: The bounding rectangle of
all control points
- (
NSPoint)
currentPoint;
Availability: OpenStep
Returns the current point in the path (the last
point added). Returns: The current path point
- (void)
curveToPoint: (
NSPoint)aPoint
controlPoint1: (
NSPoint)controlPoint1
controlPoint2: (
NSPoint)controlPoint2;
Availability: OpenStep
Appends a cubic Bézier curve from the current point
to the specified endpoint. aPoint: The endpoint of the
curve controlPoint1: The first control point
controlPoint2: The second control point
- (
NSBezierPathElement)
elementAtIndex: (
NSInteger)index;
Availability: OpenStep
Returns the type of path element at the given
index. index: The zero-based
index of the element Returns: The type of
path element at the specified index
- (
NSBezierPathElement)
elementAtIndex: (
NSInteger)index
associatedPoints: (
NSPoint*)points;
Availability: OpenStep
Returns the type of path element at the given
index and its associated points
. index: The zero-based index of the element
points: Array to fill with associated
points (may be NULL) Returns: The type of
path element at the specified index
- (
NSInteger)
elementCount;
Availability: OpenStep
Returns the number of path elements in the path.
Returns: The count of path elements (moveTo,
lineTo, curveTo, closePath)
- (void)
fill;
Availability: OpenStep
Fills the path using the current fill color and
winding rule.
- (CGFloat)
flatness;
Availability: OpenStep
Returns the flatness value for curve approximation.
Returns: The current flatness value
- (void)
getLineDash: (CGFloat*)pattern
count: (
NSInteger*)count
phase: (CGFloat*)phase;
Availability: OpenStep
Gets the current dash pattern,
count, and phase. pattern:
Array to fill with dash pattern values
(may be NULL) count: Pointer to store the number of
dash elements phase: Pointer to store the dash
phase offset
- (BOOL)
isEmpty;
Availability: OpenStep
Returns whether the path contains any elements.
Returns: YES if the path is empty,
NO otherwise
- (
NSLineCapStyle)
lineCapStyle;
Availability: OpenStep
Returns the line cap style for path endpoints.
Returns: The current line cap style
- (
NSLineJoinStyle)
lineJoinStyle;
Availability: OpenStep
Returns the line join style for path corners.
Returns: The current line join style
- (void)
lineToPoint: (
NSPoint)aPoint;
Availability: OpenStep
Appends a straight line from the current point to
the specified point. aPoint: The endpoint of the line
segment
- (CGFloat)
lineWidth;
Availability: OpenStep
Returns the line width for stroking the path.
Returns: The current line width
- (CGFloat)
miterLimit;
Availability: OpenStep
Returns the miter limit for line joins. Returns:
The current miter limit value
- (void)
moveToPoint: (
NSPoint)aPoint;
Availability: OpenStep
Moves the current path point to the specified
location. aPoint: The point to move to
- (void)
relativeCurveToPoint: (
NSPoint)aPoint
controlPoint1: (
NSPoint)controlPoint1
controlPoint2: (
NSPoint)controlPoint2;
Availability: OpenStep
Appends a cubic Bézier curve using relative
coordinates. aPoint: The relative endpoint
offset controlPoint1: The first control point offset
controlPoint2: The second control point
offset
- (void)
relativeLineToPoint: (
NSPoint)aPoint;
Availability: OpenStep
Appends a straight line from the current point by
the specified offset. aPoint: The relative endpoint
offset
- (void)
relativeMoveToPoint: (
NSPoint)aPoint;
Availability: OpenStep
Moves the current path point by the specified offset.
aPoint: The relative offset to move by
- (void)
removeAllPoints;
Availability: OpenStep
Removes all path elements, creating an empty path.
- (void)
setAssociatedPoints: (
NSPoint*)points
atIndex: (
NSInteger)index;
Availability: OpenStep
Sets the associated points for the path
element at the given index. points:
Array of points to associate with the
element index: The zero-based index of
the element
- (void)
setCachesBezierPath: (BOOL)flag;
Availability: OpenStep
Sets whether the path should cache its bezier path
data for performance. flag: YES to enable
caching, NO to disable it
- (void)
setClip;
Availability: OpenStep
Sets the clipping region to the area enclosed by the
path.
- (void)
setFlatness: (CGFloat)flatness;
Availability: OpenStep
Sets the flatness value for curve
approximation. flatness: The
flatness value (smaller values create
smoother curves)
- (void)
setLineCapStyle: (
NSLineCapStyle)lineCapStyle;
Availability: OpenStep
Sets the line cap style for path endpoints.
lineCapStyle: The new line cap style
- (void)
setLineDash: (const CGFloat*)pattern
count: (
NSInteger)count
phase: (CGFloat)phase;
Availability: OpenStep
Sets the dash pattern for stroking the
path. pattern: Array of dash lengths (alternating
stroke and gap lengths) count: Number of elements in
the pattern array phase: Offset into the
dash pattern at which to start
- (void)
setLineJoinStyle: (
NSLineJoinStyle)lineJoinStyle;
Availability: OpenStep
Sets the line join style for path corners.
lineJoinStyle: The new line join style
- (void)
setLineWidth: (CGFloat)lineWidth;
Availability: OpenStep
Sets the line width for stroking the path. lineWidth:
The new line width
- (void)
setMiterLimit: (CGFloat)limit;
Availability: OpenStep
Sets the miter limit for line joins. limit:
The miter limit value (must be >= 1.0)
- (void)
setWindingRule: (
NSWindingRule)windingRule;
Availability: OpenStep
Sets the winding rule used for fill operations.
windingRule: The new winding rule
- (void)
stroke;
Availability: OpenStep
Strokes the path using the current stroke color and
line attributes.
- (void)
transformUsingAffineTransform: (
NSAffineTransform*)transform;
Availability: OpenStep
Transforms all points in the path using the
given affine transformation. transform: The
NSAffineTransform to apply to the path
- (int)
windingCountAtPoint: (
NSPoint)point;
Availability: Not in OpenStep/MacOS-X
Returns the winding count, according to the
PostScript definition, at the given
point.
- (
NSWindingRule)
windingRule;
Availability: OpenStep
Returns the winding rule used for fill operations.
Returns: The current winding rule
Up