Inherits from SPTexture : NSObject
Declared in SPSubTexture.h

Overview

An SPSubTexture represents a section of another texture. This is achieved solely by manipulation of texture coordinates, making the class very efficient.

Note that it is OK to create subtextures of subtextures.

Tasks

Initializers

Properties

  •   baseTexture

    The texture which the subtexture is based on.

    property
  •   clipping

    The clipping rectangle, which is the region provided on initialization, scaled into [0.0, 1.0].

    property

Properties

baseTexture

The texture which the subtexture is based on.

@property (nonatomic, readonly) SPTexture *baseTexture

Discussion

The texture which the subtexture is based on.

Declared In

SPSubTexture.h

clipping

The clipping rectangle, which is the region provided on initialization, scaled into [0.0, 1.0].

@property (nonatomic, copy) SPRectangle *clipping

Discussion

The clipping rectangle, which is the region provided on initialization, scaled into [0.0, 1.0].

Declared In

SPSubTexture.h

Class Methods

textureWithRegion:ofTexture:

Factory method.

+ (SPSubTexture *)textureWithRegion:(SPRectangle *)region ofTexture:(SPTexture *)texture

Discussion

Factory method.

Declared In

SPSubTexture.h

Instance Methods

initWithRegion:ofTexture:

Initializes a subtexture with a region (in points) of another texture.

- (id)initWithRegion:(SPRectangle *)region ofTexture:(SPTexture *)texture

Discussion

Initializes a subtexture with a region (in points) of another texture.

Declared In

SPSubTexture.h