public abstract class Graphics
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Graphics.Orientation
Enumerates simplified device orientations.
|
static class |
Graphics.OrientationDetail
Enumerates detailed device orientations.
|
| Modifier and Type | Field and Description |
|---|---|
RenderTarget |
defaultRenderTarget
The render target for the default framebuffer.
|
ValueView<Graphics.Orientation> |
deviceOrient
The current orientation of the device.
|
GL20 |
gl
Provides access to GL services.
|
ValueView<Graphics.OrientationDetail> |
orientDetail
The current orientation of the device in more detailed form.
|
IDimension |
viewSize
The current size of the graphics viewport.
|
| Modifier and Type | Method and Description |
|---|---|
Canvas |
createCanvas(float width,
float height)
Creates a
Canvas with the specified display unit size. |
Canvas |
createCanvas(IDimension size)
|
abstract Gradient |
createGradient(Gradient.Config config)
Creates a
Gradient fill pattern. |
abstract Path |
createPath()
Creates a
Path object. |
Texture |
createTexture(float width,
float height,
Texture.Config config)
Creates an empty texture into which one can render.
|
Texture |
createTexture(IDimension size,
Texture.Config config)
|
abstract TextLayout |
layoutText(java.lang.String text,
TextFormat format)
Lays out a single line of text using the specified format.
|
abstract TextLayout[] |
layoutText(java.lang.String text,
TextFormat format,
TextWrap wrap)
Lays out multiple lines of text using the specified format and wrap configuration.
|
Scale |
scale()
Returns the display scale factor.
|
abstract IDimension |
screenSize()
Returns the size of the screen in display units.
|
public final GL20 gl
public final IDimension viewSize
public final ValueView<Graphics.Orientation> deviceOrient
PORTRAIT.public final ValueView<Graphics.OrientationDetail> orientDetail
UNKNOWN.public RenderTarget defaultRenderTarget
public Scale scale()
Scale.ONE except on HiDPI devices that
have been configured to use HiDPI mode.public abstract IDimension screenSize()
public Canvas createCanvas(float width, float height)
Canvas with the specified display unit size.public Canvas createCanvas(IDimension size)
public abstract Gradient createGradient(Gradient.Config config)
Gradient fill pattern.public Texture createTexture(float width, float height, Texture.Config config)
public Texture createTexture(IDimension size, Texture.Config config)
public abstract TextLayout layoutText(java.lang.String text, TextFormat format)
(TextLayout,float,float).public abstract TextLayout[] layoutText(java.lang.String text, TextFormat format, TextWrap wrap)
(TextLayout,float,float).Copyright © 2018. All Rights Reserved.