public interface Graphics
Canvas.| Modifier and Type | Method and Description |
|---|---|
Font |
createFont(String name,
Font.Style style,
float size)
Creates a font with the specified configuration.
|
GroupLayer |
createGroupLayer()
Creates a group layer.
|
GroupLayer.Clipped |
createGroupLayer(float width,
float height)
Creates a clipped group layer, with the initial clipping size.
|
CanvasImage |
createImage(float width,
float height)
Creates an image that can be painted using the
Canvas interface. |
ImageLayer |
createImageLayer()
Creates an image layer with no configured image.
|
ImageLayer |
createImageLayer(Image image)
Creates an image layer with the supplied image.
|
ImmediateLayer |
createImmediateLayer(ImmediateLayer.Renderer renderer)
Creates an unclipped immediate layer.
|
ImmediateLayer.Clipped |
createImmediateLayer(int width,
int height,
ImmediateLayer.Renderer renderer)
Creates an immediate layer that is clipped to the specified rectangular region.
|
Gradient |
createLinearGradient(float x0,
float y0,
float x1,
float y1,
int[] colors,
float[] positions)
Creates a linear gradient fill pattern.
|
Gradient |
createRadialGradient(float x,
float y,
float r,
int[] colors,
float[] positions)
Creates a radial gradient fill pattern.
|
SurfaceImage |
createSurface(float width,
float height)
Creates an image that can be rendered into using the
Surface interface. |
SurfaceLayer |
createSurfaceLayer(float width,
float height)
Deprecated.
|
GLContext |
ctx()
Returns the GL context on platforms that use GL, null otherwise.
|
GL20 |
gl20()
Returns a reference to the GL context.
|
int |
height()
Gets the height of the drawable surface, in pixels.
|
TextLayout |
layoutText(String text,
TextFormat format)
Lays out the supplied text using the specified format.
|
GroupLayer |
rootLayer()
Returns the root of the scene graph.
|
float |
scaleFactor()
Returns the display scale factor.
|
int |
screenHeight()
Gets the height of the available screen real-estate, in pixels.
|
int |
screenWidth()
Gets the width of the available screen real-estate, in pixels.
|
int |
width()
Gets the width of the drawable surface, in pixels.
|
int width()
int height()
int screenHeight()
int screenWidth()
float scaleFactor()
GroupLayer rootLayer()
GLContext ctx()
GL20 gl20()
GroupLayer createGroupLayer()
GroupLayer.Clipped createGroupLayer(float width, float height)
ImmediateLayer.Clipped createImmediateLayer(int width, int height, ImmediateLayer.Renderer renderer)
width - the horizontal extent of the layer's drawable region.height - the vertical extent of the layer's drawable region.ImmediateLayer createImmediateLayer(ImmediateLayer.Renderer renderer)
ImageLayer createImageLayer()
createImageLayer().setImage(image).ImageLayer createImageLayer(Image image)
@Deprecated SurfaceLayer createSurfaceLayer(float width, float height)
CanvasImage createImage(float width, float height)
Canvas interface.SurfaceImage createSurface(float width, float height)
Surface interface.Gradient createLinearGradient(float x0, float y0, float x1, float y1, int[] colors, float[] positions)
Gradient createRadialGradient(float x, float y, float r, int[] colors, float[] positions)
Font createFont(String name, Font.Style style, float size)
TextLayout layoutText(String text, TextFormat format)
Canvas.fillText(TextLayout,float,float).Copyright © 2013. All Rights Reserved.