Class CanvasBlock

All Implemented Interfaces:
Comparable<Content>, Senseable

public class CanvasBlock extends Block
  • Field Details

    • padding

      public float padding
    • canvasSize

      public int canvasSize
    • palette

      public int[] palette
    • bitsPerPixel

      public int bitsPerPixel
    • colorToIndex

      public arc.struct.IntIntMap colorToIndex
    • side1

      public arc.graphics.g2d.TextureRegion side1
    • side2

      public arc.graphics.g2d.TextureRegion side2
    • corner1

      public arc.graphics.g2d.TextureRegion corner1
    • corner2

      public arc.graphics.g2d.TextureRegion corner2
    • previewPixmap

      @Nullable protected arc.graphics.Pixmap previewPixmap
    • previewTexture

      @Nullable protected arc.graphics.Texture previewTexture
    • tempBlend

      protected int tempBlend
  • Constructor Details

    • CanvasBlock

      public CanvasBlock(String name)
  • Method Details

    • init

      public void init()
      Description copied from class: Block
      Called after all blocks are created.
      Overrides:
      init in class Block
    • drawPlanRegion

      public void drawPlanRegion(BuildPlan plan, arc.util.Eachable<BuildPlan> list)
      Overrides:
      drawPlanRegion in class Block
    • makePixmap

      public arc.graphics.Pixmap makePixmap(byte[] data)
      returns the same pixmap instance each time, use with care
    • getByte

      protected int getByte(byte[] data, int bitOffset)