Class DeferredCache

java.lang.Object
org.eclipse.birt.chart.render.DeferredCache
All Implemented Interfaces:
Comparable<DeferredCache>

public final class DeferredCache extends Object implements Comparable<DeferredCache>
This class implements deferred rendering capability for chart.
  • Field Details

  • Constructor Details

    • DeferredCache

      public DeferredCache(IDeviceRenderer idr, Chart c, int cacheIndex)
      The constructor.
  • Method Details

    • addPlane

      public Object addPlane(PrimitiveRenderEvent pre, int iInstruction)
      Adds rendering Plane event to cache.
      Parameters:
      pre - As of now, supported types are RectanguleRenderEvent and PolygonRenderEvent
    • addPlane

      public Object addPlane(PrimitiveRenderEvent pre, int iInstruction, int zorder_hint)
    • addPlaneShadow

      public void addPlaneShadow(PrimitiveRenderEvent pre, int iInstruction)
      Adds rendering Plane event to cache. This Plane is usually a shadow or depth, and will be in the lower z-order
      Parameters:
      pre - As of now, supported types are RectanguleRenderEvent and PolygonRenderEvent
    • addPlaneShadow

      public void addPlaneShadow(PrimitiveRenderEvent pre, int iInstruction, int zorder_hint)
    • addModel

      public void addModel(WrappedInstruction wi)
      Adds wrapped rendering event to cache. Never use this for 3D rendering event.
    • addLine

      public void addLine(LineRenderEvent lre)
      Adds line rendering event to cache.
    • addConnectionLine

      public void addConnectionLine(LineRenderEvent lre)
      Adds marker connection line rendering event to cache.
    • addLabel

      public void addLabel(TextRenderEvent tre)
      Adds text rendering event to cache.
    • addMarker

      public void addMarker(PrimitiveRenderEvent pre, int iInstruction, double iMarkerSize, int zOrder)
      Adds marker rendering event to cache.
    • flush

      public void flush() throws ChartException
      Flush the cache, perform all pending rendering tasks.
      Throws:
      ChartException
    • flushOptions

      public void flushOptions(int options) throws ChartException
      Flush the cache of specified types.
      Parameters:
      options - types
      Throws:
      ChartException
      Since:
      2.2
      See Also:
    • process3DEvent

      public void process3DEvent(Engine3D engine, double xOffset, double yOffset)
      Pre-process all the 3D rendering events. This must be called before flush().
    • isTransposed

      public boolean isTransposed()
      Returns:
      Returns if current rendering context is transposed.
    • getAllConnectionLines

      public List<LineRenderEvent> getAllConnectionLines()
      Returns all cached connection lines.
      Returns:
      all cached connection lines.
    • getAllMarkers

      public List<MarkerInstruction> getAllMarkers()
      Returns all cached markers.
      Returns:
      all cached markers.
    • getAllLabels

      public List<TextRenderEvent> getAllLabels()
      Returns all cached labels.
      Returns:
      all cached labels.
    • setPlaneShadowsComparator

      public void setPlaneShadowsComparator(Comparator<?> cp)
    • setPlanesComparator

      public void setPlanesComparator(Comparator<?> cp)
    • deriveNewDeferredCache

      public DeferredCache deriveNewDeferredCache()
      Create a new instance of DeverredCache according to current device render and chart model.
      Returns:
      Since:
      2.6.2
    • getParentDeferredCache

      public DeferredCache getParentDeferredCache()
    • setParentDeferredCache

      public void setParentDeferredCache(DeferredCache dc)
    • setAntialiasing

      public void setAntialiasing(boolean antialiasing)
      Enables if all 3D polygons in current deferred cache need antialiasing.
      Parameters:
      antialiasing -
    • compareTo

      public int compareTo(DeferredCache other)
      Specified by:
      compareTo in interface Comparable<DeferredCache>