Class DrawUtils

java.lang.Object
com.prineside.tdi2.utils.DrawUtils

public class DrawUtils extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    bakeVertices(float[] toVertices, com.badlogic.gdx.graphics.g2d.TextureRegion region, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation)
    Запечь вершины, чтобы использовать в Batch.
    static com.badlogic.gdx.graphics.Mesh
    copyMesh(com.badlogic.gdx.graphics.Mesh meshToCopy, boolean isStatic, boolean removeDuplicates, int[] usage)
     
    static void
    drawFontToCache(com.badlogic.gdx.graphics.g2d.SpriteCache cache, CharSequence text, com.badlogic.gdx.graphics.g2d.BitmapFont font, float color, float x, float y, float targetWidth, int halign, boolean wrap)
     
    static void
    drawFontToCache(com.badlogic.gdx.graphics.g2d.SpriteCache cache, CharSequence text, com.badlogic.gdx.graphics.g2d.BitmapFont font, float color, float x, float y, float targetWidth, int halign, boolean wrap, float scale)
     
    static com.badlogic.gdx.graphics.Mesh
    mergeMeshes(com.badlogic.gdx.utils.Array<com.badlogic.gdx.graphics.Mesh> meshes, com.badlogic.gdx.utils.Array<com.badlogic.gdx.math.Matrix4> transformations)
     
    static void
    texturedLine(com.badlogic.gdx.graphics.g2d.Batch batch, com.badlogic.gdx.graphics.g2d.TextureRegion textureRegion, float startX, float startY, float endX, float endY, float width)
     
    static void
    texturedLine(com.badlogic.gdx.graphics.g2d.Batch batch, com.badlogic.gdx.graphics.g2d.TextureRegion textureRegion, float startX, float startY, float endX, float endY, float width, float startColor, float endColor)
     
    static void
    texturedLine(com.badlogic.gdx.graphics.g2d.Batch batch, com.badlogic.gdx.graphics.g2d.TextureRegion textureRegion, float startX, float startY, float endX, float endY, float startWidth, float endWidth, float startAngleRad, float endAngleRad, float startColor, float endColor)
     
    static void
    texturedLine(com.badlogic.gdx.graphics.g2d.Batch batch, com.badlogic.gdx.graphics.g2d.TextureRegion textureRegion, float startX, float startY, float endX, float endY, float startWidth, float endWidth, float startAngleRad, float endAngleRad, com.badlogic.gdx.graphics.Color startColor, com.badlogic.gdx.graphics.Color endColor)
     
    static void
    texturedLine(com.badlogic.gdx.graphics.g2d.Batch batch, com.badlogic.gdx.graphics.g2d.TextureRegion textureRegion, float startX, float startY, float endX, float endY, float startWidth, float endWidth, com.badlogic.gdx.graphics.Color startColor, com.badlogic.gdx.graphics.Color endColor)
     
    static void
    texturedLine(com.badlogic.gdx.graphics.g2d.Batch batch, com.badlogic.gdx.graphics.Texture texture, float u, float v, float u2, float v2, float startX, float startY, float endX, float endY, float startWidth, float endWidth, float startAngleRad, float endAngleRad, float startColorBits, float endColorBits)
     
    static void
    texturedLine(com.badlogic.gdx.graphics.g2d.SpriteCache spriteCache, com.badlogic.gdx.graphics.g2d.TextureRegion textureRegion, float startX, float startY, float endX, float endY, float width, float startColor, float endColor)
     
    static void
    texturedLine(com.badlogic.gdx.graphics.g2d.SpriteCache spriteCache, com.badlogic.gdx.graphics.g2d.TextureRegion textureRegion, float startX, float startY, float endX, float endY, float startWidth, float endWidth, float startAngleRad, float endAngleRad, float startColor, float endColor)
     
    static void
    texturedMultiLine(com.badlogic.gdx.graphics.g2d.Batch batch, float width, com.badlogic.gdx.graphics.g2d.TextureRegion textureRegion, float[] data)
    data - массив точек линии, каждая точка состоит из 4 floats: x, y, color Минимум 2 точки

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DrawUtils

      public DrawUtils()
  • Method Details

    • bakeVertices

      public static void bakeVertices(float[] toVertices, com.badlogic.gdx.graphics.g2d.TextureRegion region, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation)
      Запечь вершины, чтобы использовать в Batch. Цвет не устанавливается (будет белый) - менять ячейки i * 5 + 2
      Parameters:
      toVertices - float[20]
    • texturedMultiLine

      public static void texturedMultiLine(com.badlogic.gdx.graphics.g2d.Batch batch, float width, com.badlogic.gdx.graphics.g2d.TextureRegion textureRegion, float[] data)
      data - массив точек линии, каждая точка состоит из 4 floats: x, y, color Минимум 2 точки
    • texturedLine

      public static void texturedLine(com.badlogic.gdx.graphics.g2d.Batch batch, com.badlogic.gdx.graphics.g2d.TextureRegion textureRegion, float startX, float startY, float endX, float endY, float width)
    • texturedLine

      public static void texturedLine(com.badlogic.gdx.graphics.g2d.Batch batch, com.badlogic.gdx.graphics.g2d.TextureRegion textureRegion, float startX, float startY, float endX, float endY, float width, float startColor, float endColor)
    • texturedLine

      public static void texturedLine(com.badlogic.gdx.graphics.g2d.Batch batch, com.badlogic.gdx.graphics.g2d.TextureRegion textureRegion, float startX, float startY, float endX, float endY, float startWidth, float endWidth, float startAngleRad, float endAngleRad, float startColor, float endColor)
    • texturedLine

      public static void texturedLine(com.badlogic.gdx.graphics.g2d.SpriteCache spriteCache, com.badlogic.gdx.graphics.g2d.TextureRegion textureRegion, float startX, float startY, float endX, float endY, float width, float startColor, float endColor)
    • texturedLine

      public static void texturedLine(com.badlogic.gdx.graphics.g2d.SpriteCache spriteCache, com.badlogic.gdx.graphics.g2d.TextureRegion textureRegion, float startX, float startY, float endX, float endY, float startWidth, float endWidth, float startAngleRad, float endAngleRad, float startColor, float endColor)
    • texturedLine

      public static void texturedLine(com.badlogic.gdx.graphics.g2d.Batch batch, com.badlogic.gdx.graphics.g2d.TextureRegion textureRegion, float startX, float startY, float endX, float endY, float startWidth, float endWidth, float startAngleRad, float endAngleRad, com.badlogic.gdx.graphics.Color startColor, com.badlogic.gdx.graphics.Color endColor)
    • texturedLine

      public static void texturedLine(com.badlogic.gdx.graphics.g2d.Batch batch, com.badlogic.gdx.graphics.Texture texture, float u, float v, float u2, float v2, float startX, float startY, float endX, float endY, float startWidth, float endWidth, float startAngleRad, float endAngleRad, float startColorBits, float endColorBits)
    • texturedLine

      public static void texturedLine(com.badlogic.gdx.graphics.g2d.Batch batch, com.badlogic.gdx.graphics.g2d.TextureRegion textureRegion, float startX, float startY, float endX, float endY, float startWidth, float endWidth, com.badlogic.gdx.graphics.Color startColor, com.badlogic.gdx.graphics.Color endColor)
    • drawFontToCache

      public static void drawFontToCache(com.badlogic.gdx.graphics.g2d.SpriteCache cache, CharSequence text, com.badlogic.gdx.graphics.g2d.BitmapFont font, float color, float x, float y, float targetWidth, int halign, boolean wrap)
    • drawFontToCache

      public static void drawFontToCache(com.badlogic.gdx.graphics.g2d.SpriteCache cache, CharSequence text, com.badlogic.gdx.graphics.g2d.BitmapFont font, float color, float x, float y, float targetWidth, int halign, boolean wrap, float scale)
    • mergeMeshes

      public static com.badlogic.gdx.graphics.Mesh mergeMeshes(com.badlogic.gdx.utils.Array<com.badlogic.gdx.graphics.Mesh> meshes, com.badlogic.gdx.utils.Array<com.badlogic.gdx.math.Matrix4> transformations)
    • copyMesh

      public static com.badlogic.gdx.graphics.Mesh copyMesh(com.badlogic.gdx.graphics.Mesh meshToCopy, boolean isStatic, boolean removeDuplicates, int[] usage)