Package arc.graphics.g2d
Class Draw
java.lang.Object
arc.graphics.g2d.Draw
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
alpha
(float alpha) static void
static void
static void
static void
static void
blend()
static void
static void
blit
(FrameBuffer buffer, Shader shader) Blits a framebuffer onto the screen with a shader.static void
Blits an already-bound texture onto the screen with a shader.static void
Blits a texture onto the screen with a shader.static void
color()
static void
color
(float color) static void
color
(float r, float g, float b) static void
color
(float r, float g, float b, float a) static void
color
(int color) static void
static void
static void
Automatically mixes colors.static void
static void
colorl
(float l) Lightness color.static void
colorl
(float l, float a) Lightness color, alpha.static void
static void
On a sorting or queued batch implementation, this treats everything inside the runnable as one unit.static void
Applies runnables for the begin and end of a specific Z value.static void
Applies runnables for the begin and end of a specific Z value.static void
static void
fbo
(FrameBuffer buffer, int worldWidth, int worldHeight, int tilesize) Draws a portion of a world-sized texture.static void
Draws a portion of a world-sized texture.static void
Draws a portion of a world-sized texture.static void
flush()
static Blending
getBlend()
static Color
getColor()
static Color
static Shader
static void
mixcol()
static void
static void
static Mat
proj()
static void
proj
(float x, float y, float w, float h) static void
static void
static void
rect()
Fill a white quad to the camera.static void
rect
(TextureRegion region, float x, float y) static void
rect
(TextureRegion region, float x, float y, float rotation) static void
rect
(TextureRegion region, float x, float y, float w, float h) static void
rect
(TextureRegion region, float x, float y, float w, float h, float rotation) static void
rect
(TextureRegion region, float x, float y, float w, float h, float originX, float originY, float rotation) static void
rect
(TextureRegion region, Position pos, float rotation) static void
rect
(TextureRegion region, Position pos, float w, float h) static void
rect
(TextureRegion region, Position pos, float w, float h, float rotation) static void
static void
static void
static void
static void
rect
(String region, float x, float y, float w, float h, float originX, float originY, float rotation) static void
rectv
(TextureRegion region, float x, float y, float width, float height, float originX, float originY, float rotation, Cons<Vec2> tweaker) static void
rectv
(TextureRegion region, float x, float y, float width, float height, float rotation, Cons<Vec2> tweaker) static void
rectv
(TextureRegion region, float x, float y, float width, float height, Cons<Vec2> tweaker) static void
reset()
static void
scl()
static void
scl
(float nscl) static void
scl
(float nxscl, float nyscl) static void
shader()
static void
static void
static void
sort
(boolean sort) Note that sorting is disabled by default, even if it is supported.static void
sortAscending
(boolean ascend) Sets sorting order to either be ascending or descending in terms of Z.static void
static void
static void
static Mat
trans()
static void
static void
static TextureRegion
static float
z()
static void
z
(float z) Note that this does nothing on most Batch implementations.static void
static void
Sets a Z-transformer function that will modify subsequent calls to Draw.z.
-
Field Details
-
scl
public static float scl -
xscl
public static float xscl -
yscl
public static float yscl
-
-
Constructor Details
-
Draw
public Draw()
-
-
Method Details
-
blit
Blits an already-bound texture onto the screen with a shader. This does not use a spritebatch! -
blit
Blits a texture onto the screen with a shader. This does not use a spritebatch! -
blit
Blits a framebuffer onto the screen with a shader. This does not use a spritebatch! -
batch
-
batch
-
stencil
-
beginStencil
public static void beginStencil() -
beginStenciled
public static void beginStenciled() -
endStencil
public static void endStencil() -
scl
public static void scl(float nscl) -
scl
public static void scl(float nxscl, float nyscl) -
scl
public static void scl() -
getShader
-
shader
-
shader
-
shader
public static void shader() -
sort
public static void sort(boolean sort) Note that sorting is disabled by default, even if it is supported. -
sortAscending
public static void sortAscending(boolean ascend) Sets sorting order to either be ascending or descending in terms of Z. Default: true. -
zTransform
Sets a Z-transformer function that will modify subsequent calls to Draw.z. Yep, this is as terrible as it sounds. -
zTransform
public static void zTransform() -
z
public static float z() -
z
public static void z(float z) Note that this does nothing on most Batch implementations. -
getColor
-
getMixColor
-
mixcol
-
mixcol
-
mixcol
public static void mixcol() -
tint
-
tint
-
colorMul
-
color
-
color
-
color
public static void color(int color) -
color
public static void color(float color) -
color
-
color
Automatically mixes colors. -
color
public static void color() -
color
public static void color(float r, float g, float b) -
color
public static void color(float r, float g, float b, float a) -
colorl
public static void colorl(float l) Lightness color. -
colorl
public static void colorl(float l, float a) Lightness color, alpha. -
blend
-
blend
public static void blend() -
getBlend
-
reset
public static void reset() -
alpha
public static void alpha(float alpha) -
fbo
Draws a portion of a world-sized texture. -
fbo
Draws a portion of a world-sized texture. -
fbo
public static void fbo(Texture texture, int worldWidth, int worldHeight, int tilesize, float offset) Draws a portion of a world-sized texture. -
draw
On a sorting or queued batch implementation, this treats everything inside the runnable as one unit. Thus, it can be used to set shaders and do other special state. -
drawRange
Applies runnables for the begin and end of a specific Z value. Useful for framebuffers or batched shader begin/ends. -
drawRange
Applies runnables for the begin and end of a specific Z value. Useful for framebuffers or batched shader begin/ends. -
rect
public static void rect()Fill a white quad to the camera. -
rect
-
rect
-
rect
-
rect
-
rect
public static void rect(TextureRegion region, float x, float y, float w, float h, float originX, float originY, float rotation) -
rect
public static void rect(String region, float x, float y, float w, float h, float originX, float originY, float rotation) -
rect
-
rect
-
rect
-
rect
-
rect
-
rect
-
rect
-
vert
-
flush
public static void flush() -
proj
public static void proj(float x, float y, float w, float h) -
proj
-
proj
-
proj
-
trans
-
trans
-
wrap
-
rectv
public static void rectv(TextureRegion region, float x, float y, float width, float height, Cons<Vec2> tweaker) -
rectv
public static void rectv(TextureRegion region, float x, float y, float width, float height, float rotation, Cons<Vec2> tweaker) -
rectv
public static void rectv(TextureRegion region, float x, float y, float width, float height, float originX, float originY, float rotation, Cons<Vec2> tweaker)
-