UIGraphics.BeginImageContext(CGSize) Method

Definition

Pushes a new image context and makes it the current graphics context.

public static void BeginImageContext(CoreGraphics.CGSize size);
static member BeginImageContext : CoreGraphics.CGSize -> unit

Parameters

size
CGSize

Size of the image context.

Remarks

UIKit keeps a stack of image contexts. This method creates a new image context, makes it the default and places it at the top of the graphic context stack.

To restore the previous graphics context, call the EndImageContext() method.

You can get the image from the current image context by calling the GetImageFromCurrentImageContext() method.

Developers can call this method from any thread.

Applies to