Contents

lockTextureRepresentation(with:forBounds:)

Creates an OpenGL texture representation from a subregion of the image source using the provided color space.

Declaration

func lockTextureRepresentation(with colorSpace: CGColorSpace!, forBounds bounds: NSRect) -> Bool

Parameters

  • colorSpace:

    A Quartz color space.

  • bounds:

    The bounds of the subregion, expressed in pixels. They must be aligned to integer boundaries.

Return Value

true is successful; false if texture can’t be created.

Discussion

Neither the content of the texture nor its states (for example, the wrap mode) must be modified; you can only draw with it. The texture is valid only in the plug-in context.

See Also

Converting an Image to a Representation