PAGSurface Class Reference

Inherits from NSObject
Declared in PAGSurface.h

+ FromView:

+ (PAGSurface *)FromView:(NSView *)view

+ MakeFromGPU:

Deprecated Creates an offscreen PAGSurface of the specified size for pixel reading.

+ (PAGSurface *)MakeFromGPU:(CGSize)size

Declared In

PAGSurface.h

+ MakeOffscreen:

Creates an offscreen PAGSurface of the specified size for pixel reading.

+ (PAGSurface *)MakeOffscreen:(CGSize)size

Declared In

PAGSurface.h

– width

The width of the surface.

- (int)width

Declared In

PAGSurface.h

– height

The height of the surface.

- (int)height

Declared In

PAGSurface.h

– updateSize

Update the size of the surface, and reset the internal surface.

- (void)updateSize

Declared In

PAGSurface.h

– clearAll

Erases all pixels of this surface with transparent color. Returns true if the content has changed.

- (BOOL)clearAll

Declared In

PAGSurface.h

– freeCache

Free the cache created by the surface immediately. Can be called to reduce memory pressure.

- (void)freeCache

Declared In

PAGSurface.h

– getCVPixelBuffer

Returns the internal CVPixelBuffer object associated with this PAGSurface, returns nil if this PAGSurface is created by [PAGSurface FromLayer].

- (CVPixelBufferRef)getCVPixelBuffer

Declared In

PAGSurface.h

– makeSnapshot

Returns a CVPixelBuffer object capturing the contents of the PAGSurface. Subsequent rendering of the PAGSurface will not be captured.

- (CVPixelBufferRef)makeSnapshot

Declared In

PAGSurface.h