Class DefaultCarAnimation.Text

All Implemented Interfaces:
Serializable, nl.tudelft.simulation.dsol.animation.Locatable, org.opentrafficsim.base.geometry.OtsLocatable, org.opentrafficsim.base.geometry.SpatialObject
Enclosing class:
DefaultCarAnimation

public class DefaultCarAnimation.Text extends TextAnimation<DefaultCarAnimation.GtuData,DefaultCarAnimation.Text>
Text animation for the Car. Separate class to be able to turn it on and off...

Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.

Author:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
See Also:
  • Constructor Details

    • Text

      public Text(DefaultCarAnimation.GtuData source, Supplier<String> text, float dx, float dy, TextAlignment textAlignment, Color color, nl.tudelft.simulation.naming.context.Contextualized contextualized)
      Parameters:
      source - the object for which the text is displayed
      text - the text to display
      dx - the horizontal movement of the text, in meters
      dy - the vertical movement of the text, in meters
      textAlignment - where to place the text
      color - the color of the text
      contextualized - context provider
    • Text

      public Text(DefaultCarAnimation.GtuData source, Supplier<String> text, float dx, float dy, TextAlignment textAlignment, Color color, nl.tudelft.simulation.naming.context.Contextualized contextualized, TextAnimation.ContrastToBackground background)
      Parameters:
      source - the object for which the text is displayed
      text - the text to display
      dx - the horizontal movement of the text, in meters
      dy - the vertical movement of the text, in meters
      textAlignment - where to place the text
      color - the color of the text
      contextualized - context provider
      background - TextAnimation.ContrastToBackground; connection to retrieve the current background color
  • Method Details