public final class UIGraphics extends Object
Modifier and Type | Method and Description |
---|---|
static void |
beginImageContext(CGSize size)
Creates an bitmap-based image context of the specified option.
|
static void |
beginImageContextWithOptions(CGSize size,
boolean opaque,
double scale)
Creates an bitmap-based image context using the specified parameters.
|
static void |
endImageContext()
Pops the current bitmap-based image context from the top of the stack.
|
static CGContext |
getCurrentContext()
Returns the current graphics context.
|
static UIImage |
getImageFromCurrentImageContext()
Returns the content of the current context as an image.
|
static void |
popContext()
Pops the top context from the stack and restores the previous as current
graphics context.
|
static void |
pushContext(CGContext context)
Pushes the specified context to the stack and makes it current graphics
context.
|
public static CGContext getCurrentContext()
public static void pushContext(CGContext context)
context
- The new current context.public static void popContext()
public static void beginImageContext(CGSize size)
size
- The size of the bitmap-based image.public static void beginImageContextWithOptions(CGSize size, boolean opaque, double scale)
size
- The size of the image.opaque
- TRUE the image is opaque.scale
- The scale of the image.public static UIImage getImageFromCurrentImageContext()
public static void endImageContext()
Copyright © 2020. All rights reserved.