---
title: SKShapeNode
framework: spritekit
role: symbol
role_heading: Class
path: spritekit/skshapenode
---

# SKShapeNode

A mathematical shape that can be stroked or filled.

## Declaration

```swift
class SKShapeNode
```

## Mentioned in

Animate the Warping of a Sprite Creating a Shape Node from an Array of Points Getting Started with Shape Nodes

## Overview

Overview SKShapeNode allows you to create onscreen graphical elements from mathematical points, lines, and curves. The advantage this has over rasterized graphics, such as those displayed by textures, is that shapes are rasterized dynamically at runtime to produce crisp detail and smoother edges.

## Topics

### First Steps

- [Getting Started with Shape Nodes](spritekit/getting-started-with-shape-nodes.md)

### Creating a Shape from a Path

- [init(path:)](spritekit/skshapenode/init(path:).md)
- [init(path:centered:)](spritekit/skshapenode/init(path:centered:).md)
- [path](spritekit/skshapenode/path.md)

### Creating a Shape from a Rectangle

- [init(rect:)](spritekit/skshapenode/init(rect:).md)
- [init(rectOf:)](spritekit/skshapenode/init(rectof:).md)
- [init(rect:cornerRadius:)](spritekit/skshapenode/init(rect:cornerradius:).md)
- [init(rectOf:cornerRadius:)](spritekit/skshapenode/init(rectof:cornerradius:).md)

### Creating a Circle Shape

- [init(circleOfRadius:)](spritekit/skshapenode/init(circleofradius:).md)

### Creating an Ellipse Shape

- [init(ellipseOf:)](spritekit/skshapenode/init(ellipseof:).md)
- [init(ellipseIn:)](spritekit/skshapenode/init(ellipsein:).md)

### Creating a Shape from an Array of Points

- [Creating a Shape Node from an Array of Points](spritekit/creating-a-shape-node-from-an-array-of-points.md)
- [init(points:count:)](spritekit/skshapenode/init(points:count:).md)
- [init(splinePoints:count:)](spritekit/skshapenode/init(splinepoints:count:).md)

### Filling a Shape

- [fillColor](spritekit/skshapenode/fillcolor.md)
- [fillTexture](spritekit/skshapenode/filltexture.md)

### Stroking a Shape

- [lineWidth](spritekit/skshapenode/linewidth.md)
- [strokeColor](spritekit/skshapenode/strokecolor.md)
- [strokeTexture](spritekit/skshapenode/stroketexture.md)
- [glowWidth](spritekit/skshapenode/glowwidth.md)
- [lineCap](spritekit/skshapenode/linecap.md)
- [lineJoin](spritekit/skshapenode/linejoin.md)
- [miterLimit](spritekit/skshapenode/miterlimit.md)
- [isAntialiased](spritekit/skshapenode/isantialiased.md)

### Configuring Alpha Blending

- [blendMode](spritekit/skshapenode/blendmode.md)

### Controlling or Animating Sroke Length

- [lineLength](spritekit/skshapenode/linelength.md)

### Customizing Stroking or Fill Drawing

- [Controlling Shape Drawing with Shaders](spritekit/controlling-shape-drawing-with-shaders.md)
- [strokeShader](spritekit/skshapenode/strokeshader.md)
- [fillShader](spritekit/skshapenode/fillshader.md)
- [attributeValues](spritekit/skshapenode/attributevalues.md)
- [setValue(_:forAttribute:)](spritekit/skshapenode/setvalue(_:forattribute:).md)
- [value(forAttributeNamed:)](spritekit/skshapenode/value(forattributenamed:).md)

### Instance Properties

- [customPlaygroundQuickLook](spritekit/skshapenode/customplaygroundquicklook.md)

### Initializers

- [init(ellipseInRect:)](spritekit/skshapenode/init(ellipseinrect:).md)
- [init(ellipseOfSize:)](spritekit/skshapenode/init(ellipseofsize:).md)
- [init(rectOfSize:)](spritekit/skshapenode/init(rectofsize:).md)
- [init(rectOfSize:cornerRadius:)](spritekit/skshapenode/init(rectofsize:cornerradius:).md)

## Relationships

### Inherits From

- [SKNode](spritekit/sknode.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [Copyable](swift/copyable.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)
- [NSStandardKeyBindingResponding](appkit/nsstandardkeybindingresponding.md)
- [NSTouchBarProvider](appkit/nstouchbarprovider.md)
- [NSUserActivityRestoring](appkit/nsuseractivityrestoring.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [UIActivityItemsConfigurationProviding](uikit/uiactivityitemsconfigurationproviding.md)
- [UICoordinateSpace](uikit/uicoordinatespace.md)
- [UIFocusEnvironment](uikit/uifocusenvironment.md)
- [UIFocusItem](uikit/uifocusitem.md)
- [UIFocusItemContainer](uikit/uifocusitemcontainer.md)
- [UIPasteConfigurationSupporting](uikit/uipasteconfigurationsupporting.md)
- [UIResponderStandardEditActions](uikit/uiresponderstandardeditactions.md)
- [UIUserActivityRestoring](uikit/uiuseractivityrestoring.md)

## See Also

### Nodes that Draw

- [Maximizing Node Drawing Performance](spritekit/maximizing-node-drawing-performance.md)
- [SKSpriteNode](spritekit/skspritenode.md)
- [SKEmitterNode](spritekit/skemitternode.md)
- [SKLabelNode](spritekit/sklabelnode.md)
- [SKVideoNode](spritekit/skvideonode.md)
- [SKTileMapNode](spritekit/sktilemapnode.md)
- [SK3DNode](spritekit/sk3dnode.md)
