Class Draw

java.lang.Object
arc.graphics.g2d.Draw

public class Draw extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static float
     
    static float
     
    static float
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    alpha(float alpha)
     
    static void
    batch(Batch nextBatch)
     
    static void
    batch(Batch nextBatch, Runnable run)
     
    static void
     
    static void
     
    static void
     
    static void
    blend(Blending blending)
     
    static void
    blit(FrameBuffer buffer, Shader shader)
    Blits a framebuffer onto the screen with a shader.
    static void
    blit(Shader shader)
    Blits an already-bound texture onto the screen with a shader.
    static void
    blit(Texture texture, Shader shader)
    Blits a texture onto the screen with a shader.
    static void
     
    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
    color(Color color)
     
    static void
    color(Color color, float alpha)
     
    static void
    color(Color a, Color b, float s)
    Automatically mixes colors.
    static void
    color(Color a, Color b, Color c, float progress)
     
    static void
    colorl(float l)
    Lightness color.
    static void
    colorl(float l, float a)
    Lightness color, alpha.
    static void
    colorMul(Color color, float mul)
     
    static void
    draw(float z, Runnable run)
    On a sorting or queued batch implementation, this treats everything inside the runnable as one unit.
    static void
    drawRange(float z, float range, Runnable begin, Runnable end)
    Applies runnables for the begin and end of a specific Z value.
    static void
    drawRange(float z, Runnable begin, Runnable end)
    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
    fbo(Texture texture, int worldWidth, int worldHeight, int tilesize)
    Draws a portion of a world-sized texture.
    static void
    fbo(Texture texture, int worldWidth, int worldHeight, int tilesize, float offset)
    Draws a portion of a world-sized texture.
    static void
     
    static Blending
     
    static Color
     
    static Color
     
    static Shader
     
    static void
     
    static void
    mixcol(Color color, float a)
     
    static void
    mixcol(Color a, Color b, float prog)
     
    static Mat
     
    static void
    proj(float x, float y, float w, float h)
     
    static void
    proj(Camera proj)
     
    static void
    proj(Mat proj)
     
    static void
    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
    rect(String region, float x, float y)
     
    static void
    rect(String region, float x, float y, float rotation)
     
    static void
    rect(String region, float x, float y, float w, float h)
     
    static void
    rect(String region, float x, float y, float w, float h, float rotation)
     
    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
     
    static void
    scl()
     
    static void
    scl(float nscl)
     
    static void
    scl(float nxscl, float nyscl)
     
    static void
     
    static void
    shader(Shader shader)
     
    static void
    shader(Shader shader, boolean apply)
     
    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
    stencil(Runnable stencil, Runnable contents)
     
    static void
    tint(Color color)
     
    static void
    tint(Color a, Color b, float s)
     
    static Mat
     
    static void
    trans(Mat trans)
     
    static void
    vert(Texture texture, float[] vertices, int offset, int length)
     
    wrap(Texture texture)
     
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public static void blit(Shader shader)
      Blits an already-bound texture onto the screen with a shader. This does not use a spritebatch!
    • blit

      public static void blit(Texture texture, Shader shader)
      Blits a texture onto the screen with a shader. This does not use a spritebatch!
    • blit

      public static void blit(FrameBuffer buffer, Shader shader)
      Blits a framebuffer onto the screen with a shader. This does not use a spritebatch!
    • batch

      public static void batch(Batch nextBatch)
    • batch

      public static void batch(Batch nextBatch, Runnable run)
    • stencil

      public static void stencil(Runnable stencil, Runnable contents)
    • 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

      public static Shader getShader()
    • shader

      public static void shader(Shader shader)
    • shader

      public static void shader(Shader shader, boolean apply)
    • 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

      public static void zTransform(FloatFloatf f)
      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

      public static Color getColor()
    • getMixColor

      public static Color getMixColor()
    • mixcol

      public static void mixcol(Color color, float a)
    • mixcol

      public static void mixcol(Color a, Color b, float prog)
    • mixcol

      public static void mixcol()
    • tint

      public static void tint(Color a, Color b, float s)
    • tint

      public static void tint(Color color)
    • colorMul

      public static void colorMul(Color color, float mul)
    • color

      public static void color(Color color)
    • color

      public static void color(Color color, float alpha)
    • color

      public static void color(int color)
    • color

      public static void color(float color)
    • color

      public static void color(Color a, Color b, Color c, float progress)
    • color

      public static void color(Color a, Color b, float s)
      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

      public static void blend(Blending blending)
    • blend

      public static void blend()
    • getBlend

      public static Blending getBlend()
    • reset

      public static void reset()
    • alpha

      public static void alpha(float alpha)
    • fbo

      public static void fbo(FrameBuffer buffer, int worldWidth, int worldHeight, int tilesize)
      Draws a portion of a world-sized texture.
    • fbo

      public static void fbo(Texture texture, int worldWidth, int worldHeight, int tilesize)
      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

      public static void draw(float z, Runnable run)
      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

      public static void drawRange(float z, Runnable begin, Runnable end)
      Applies runnables for the begin and end of a specific Z value. Useful for framebuffers or batched shader begin/ends.
    • drawRange

      public static void drawRange(float z, float range, Runnable begin, Runnable end)
      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

      public static void rect(String region, float x, float y, float w, float h)
    • rect

      public static void rect(TextureRegion region, float x, float y, float w, float h)
    • rect

      public static void rect(TextureRegion region, float x, float y)
    • rect

      public static void rect(String region, float x, float y)
    • 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

      public static void rect(TextureRegion region, float x, float y, float w, float h, float rotation)
    • rect

      public static void rect(String region, float x, float y, float w, float h, float rotation)
    • rect

      public static void rect(TextureRegion region, Position pos, float w, float h)
    • rect

      public static void rect(TextureRegion region, Position pos, float w, float h, float rotation)
    • rect

      public static void rect(TextureRegion region, Position pos, float rotation)
    • rect

      public static void rect(TextureRegion region, float x, float y, float rotation)
    • rect

      public static void rect(String region, float x, float y, float rotation)
    • vert

      public static void vert(Texture texture, float[] vertices, int offset, int length)
    • flush

      public static void flush()
    • proj

      public static void proj(float x, float y, float w, float h)
    • proj

      public static void proj(Camera proj)
    • proj

      public static void proj(Mat proj)
    • proj

      public static Mat proj()
    • trans

      public static void trans(Mat trans)
    • trans

      public static Mat trans()
    • wrap

      public static TextureRegion wrap(Texture texture)
    • 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)