UIGraphics.BeginImageContextWithOptions(CGSize, Boolean, NFloat) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Pushes a new image context with the specified options and makes it the current graphics context.
public static void BeginImageContextWithOptions(CoreGraphics.CGSize size, bool opaque, System.Runtime.InteropServices.NFloat scale);
static member BeginImageContextWithOptions : CoreGraphics.CGSize * bool * System.Runtime.InteropServices.NFloat -> unit
Parameters
- size
- CGSize
The size of the image context.
- opaque
- Boolean
Whether the image context is opaque.
- scale
- NFloat
The scale factor to apply (use 0 for the device's main screen scale).
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.