Class LinearChartActor

java.lang.Object
com.prineside.tdi2.scene2d.Actor
com.prineside.tdi2.ui.actors.LinearChartActor

public class LinearChartActor extends Actor
  • Constructor Details

    • LinearChartActor

      public LinearChartActor()
  • Method Details

    • draw

      public void draw(Batch batch, float parentAlpha)
      Description copied from class: Actor
      Draws the actor. The batch is configured to draw in the parent's coordinate system. This draw method is convenient to draw a rotated and scaled TextureRegion. Batch.begin() has already been called on the batch. If Batch.end() is called to draw without the batch then Batch.begin() must be called before the method returns.

      The default implementation does nothing.

      Overrides:
      draw in class Actor
      parentAlpha - The parent alpha, to be multiplied with this actor's alpha, allowing the parent's alpha to affect all children.
    • setColor

      public void setColor(Color color, Color backgroundColor)
    • setChart

      public void setChart(FloatArray vals)
      Parameters:
      vals - any amount of points between 0 and 1, will be stretched to the width of an actor
    • setChartFromInterpolation

      public void setChartFromInterpolation(InterpolationType interpolationType)
    • act

      public void act(float delta)
      Description copied from class: Actor
      Updates the actor based on time. Typically this is called each frame by Stage.act(float).

      The default implementation calls Action.act(float) on each action and removes actions that are complete.

      Overrides:
      act in class Actor
      Parameters:
      delta - Time in seconds since the last frame.