Class LabelCache

java.lang.Object
com.arbergashi.charts.internal.LabelCache

public final class LabelCache extends Object
Lightweight LRU cache for pre-rendered labels. Provides a single-entry drawing API used by BaseRenderer. The cache keys are derived from text + font + color to ensure visuals stay correct across themes.
Since:
2026-01-01
Version:
1.0.0
Author:
Arber Gashi
  • Constructor Details

    • LabelCache

      public LabelCache()
  • Method Details

    • drawLabel

      public void drawLabel(Graphics2D g2, String text, Font font, Color color, float x, float y)
      Draws a label at the given position, using a cached pre-rendered image when available.