Class FastHexaValueGridPortrayal2D

All Implemented Interfaces:
Portrayal, Portrayal2D

public class FastHexaValueGridPortrayal2D extends HexaValueGridPortrayal2D
  • Constructor Details

    • FastHexaValueGridPortrayal2D

      public FastHexaValueGridPortrayal2D(String valueName, boolean immutableField)
      If immutableField is true, we presume that the grid doesn't change. This allows us to just re-splat the buffer.
    • FastHexaValueGridPortrayal2D

      public FastHexaValueGridPortrayal2D(String valueName)
    • FastHexaValueGridPortrayal2D

      public FastHexaValueGridPortrayal2D(boolean immutableField)
      If immutableField is true, we presume that the grid doesn't change. This allows us to just re-splat the buffer.
    • FastHexaValueGridPortrayal2D

      public FastHexaValueGridPortrayal2D()
  • Method Details

    • draw

      public void draw(Object object, Graphics2D graphics, DrawInfo2D info)
      Description copied from class: FieldPortrayal2D
      Draws the field with its origin at [info.draw.x,info.draw.y], relative to the scaled coordinate system defined by [info.draw.width,info.draw.height]. The only parts that need be drawn are those which fall within the [info.clip] rectangle. Since your draw and hitObjects methods are likely to be nearly identical, you can choose instead to override the hitOrDraw method to handle both of them. By default this method simply calls hitOrDraw. FieldPortrayals will receive null for the object; they should just draw their own fields.
      Specified by:
      draw in interface Portrayal2D
      Overrides:
      draw in class FieldPortrayal2D