Package org.eclipse.birt.chart.render
Class DeferredCache
java.lang.Object
org.eclipse.birt.chart.render.DeferredCache
- All Implemented Interfaces:
Comparable<DeferredCache>
This class implements deferred rendering capability for chart.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
-
Constructor Summary
ConstructorsConstructorDescriptionDeferredCache
(IDeviceRenderer idr, Chart c, int cacheIndex) The constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds marker connection line rendering event to cache.void
addLabel
(TextRenderEvent tre) Adds text rendering event to cache.void
addLine
(LineRenderEvent lre) Adds line rendering event to cache.void
addMarker
(PrimitiveRenderEvent pre, int iInstruction, double iMarkerSize, int zOrder) Adds marker rendering event to cache.void
Adds wrapped rendering event to cache.addPlane
(PrimitiveRenderEvent pre, int iInstruction) Adds rendering Plane event to cache.addPlane
(PrimitiveRenderEvent pre, int iInstruction, int zorder_hint) void
addPlaneShadow
(PrimitiveRenderEvent pre, int iInstruction) Adds rendering Plane event to cache.void
addPlaneShadow
(PrimitiveRenderEvent pre, int iInstruction, int zorder_hint) int
compareTo
(DeferredCache other) Create a new instance ofDeverredCache
according to current device render and chart model.void
flush()
Flush the cache, perform all pending rendering tasks.void
flushOptions
(int options) Flush the cache of specified types.Returns all cached connection lines.Returns all cached labels.Returns all cached markers.boolean
void
process3DEvent
(Engine3D engine, double xOffset, double yOffset) Pre-process all the 3D rendering events.void
setAntialiasing
(boolean antialiasing) Enables if all 3D polygons in current deferred cache need antialiasing.void
void
setPlanesComparator
(Comparator<?> cp) void
-
Field Details
-
FLUSH_PLANE
public static final int FLUSH_PLANE- See Also:
-
FLUSH_LINE
public static final int FLUSH_LINE- See Also:
-
FLUSH_MARKER
public static final int FLUSH_MARKER- See Also:
-
FLUSH_LABLE
public static final int FLUSH_LABLE- See Also:
-
FLUSH_3D
public static final int FLUSH_3D- See Also:
-
FLUSH_PLANE_SHADOW
public static final int FLUSH_PLANE_SHADOW- See Also:
-
FLUSH_CONNECTION_LINE
public static final int FLUSH_CONNECTION_LINE- See Also:
-
FLUSH_ALL
public static final int FLUSH_ALL- See Also:
-
al3D
-
-
Constructor Details
-
DeferredCache
The constructor.
-
-
Method Details
-
addPlane
Adds rendering Plane event to cache.- Parameters:
pre
- As of now, supported types are RectanguleRenderEvent and PolygonRenderEvent
-
addPlane
-
addPlaneShadow
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
-
addModel
Adds wrapped rendering event to cache. Never use this for 3D rendering event. -
addLine
Adds line rendering event to cache. -
addConnectionLine
Adds marker connection line rendering event to cache. -
addLabel
Adds text rendering event to cache. -
addMarker
Adds marker rendering event to cache. -
flush
Flush the cache, perform all pending rendering tasks.- Throws:
ChartException
-
flushOptions
Flush the cache of specified types.- Parameters:
options
- types- Throws:
ChartException
- Since:
- 2.2
- See Also:
-
process3DEvent
Pre-process all the 3D rendering events. This must be called beforeflush()
. -
isTransposed
public boolean isTransposed()- Returns:
- Returns if current rendering context is transposed.
-
getAllConnectionLines
Returns all cached connection lines.- Returns:
- all cached connection lines.
-
getAllMarkers
Returns all cached markers.- Returns:
- all cached markers.
-
getAllLabels
Returns all cached labels.- Returns:
- all cached labels.
-
setPlaneShadowsComparator
-
setPlanesComparator
-
deriveNewDeferredCache
Create a new instance ofDeverredCache
according to current device render and chart model.- Returns:
- Since:
- 2.6.2
-
getParentDeferredCache
-
setParentDeferredCache
-
setAntialiasing
public void setAntialiasing(boolean antialiasing) Enables if all 3D polygons in current deferred cache need antialiasing.- Parameters:
antialiasing
-
-
compareTo
- Specified by:
compareTo
in interfaceComparable<DeferredCache>
-