iOS Guides | Samples

CoreGraphics.CGLayer Class

A hardware accelerated context.

See Also: CGLayer


public class CGLayer : INativeObject, IDisposable


CGLayers can be hardware accelerated and developers are encouraged to use this instead of CGBitmaps for off-screen rendering operations.

To create CGLayers, use the CGLayer.Create method.

Once you create a CGLayer, you extract the CGContext instance by accessing the Context property.

Related content


Namespace: CoreGraphics
Assembly: Xamarin.iOS (in Xamarin.iOS.dll)
Assembly Versions:

The members of CoreGraphics.CGLayer are listed below.

See Also: Object

Public Properties

ContextCGContext. Returns the graphics context associated with this layer.
HandleIntPtr. Handle (pointer) to the unmanaged object representation.
SizeCGSize. The size of the CGLayer

Public Methods

Create(CGContext, CGSize) : CGLayer
Creates a new CGLayer object with the specified graphics context and size
Releases the resources used by the CGLayer object.
Finalizer for the CGLayer object

Protected Methods

Releases the resources used by the CGLayer object.