<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "SpriteKit",
  "identifier" : "/documentation/SpriteKit/SKView/texture(from:crop:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SpriteKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SKView(im)textureFromNode:crop:"
  },
  "title" : "texture(from:crop:)"
}
-->

# texture(from:crop:)

Renders a portion of a node’s contents and returns the rendered image as a texture.

```
func texture(from node: SKNode, crop: CGRect) -> SKTexture?
```

## Parameters

`node`

The node object that is the root node of the tree you want to render to the texture.

`crop`

A rectangle in the node’s coordinate system that describes the area to be rendered.

## Return Value

A SpriteKit texture that holds the rendered image.

## Discussion

The node being rendered does not need to appear in the view’s presented scene. The new texture is created with a size equal to the size of the `crop` rectangle. If the node is not a scene node, it is rendered with a clear background color (`[``SKColor` `clear]`).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)