Enable nine-part stretching of the sprite's texture.
- iOS 7.0+
- macOS 10.9+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 3.0+
Controls how the texture is stretched to fill the SKSpriteNode.
The argument rectangle is in the unit coordinate space with a default value of
(0,0)-(1, which indicates that the entire texture is stretched to fill the sprite.
If instead you define a different rectangle, its coordinates are used to break the texture into a 3 x 3 grid that is scaled like the following:
The four corners of this grid are applied without performing any scaling.
The upper and lower-middle parts are scaled horizontally
The left and right-middle parts are scaled vertically
The center is scaled in all directions.
This is what's referred to as a 9-part scaling algorithm.