UIKit.UIGraphics.BeginImageContextWithOptions Method
Creates a new image context and makes it the current graphics context, allowing the control of the alpha channel and the scaling factor (for Retina Display contexts).

Syntax

[ObjCRuntime.iOS(4, 0)]
public static void BeginImageContextWithOptions (bool opaque, CoreGraphics.CGSize size, nfloat scale)

Parameters

size
Size of the image context.
opaque
If true, the bitmap created is opaque, otherwise it has an alpha channel.
scale
Scale factor to apply to the bitmap. If the value specified is zero, the device's scale factor is used.

Remarks

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

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

You can get the current context by calling the UIGraphics.GetCurrentContext() method.

This function can only be invoked from the UI thread.

Requirements

Namespace: UIKit
Assembly: Xamarin.iOS (in Xamarin.iOS.dll)
Assembly Versions: 0.0.0.0