public interface OutlinedShape
DrawContext.drawOutlinedShape(OutlinedShape, Object)
that renders outlines around filled shapes correctly and
resolves depth-buffer fighting between the shape being drawn and those previously drawn. The methods of this
interface are called by the draw context during the multi-pass rendering.Modifier and Type | Method and Description |
---|---|
void |
drawInterior(DrawContext dc,
java.lang.Object shape)
Draws the shape's filled faces.
|
void |
drawOutline(DrawContext dc,
java.lang.Object shape)
Draws the shape's outline.
|
java.lang.Double |
getDepthOffsetFactor(DrawContext dc,
java.lang.Object shape)
Returns the depth-offset factor.
|
java.lang.Double |
getDepthOffsetUnits(DrawContext dc,
java.lang.Object shape)
Returns the depth-offset units.
|
boolean |
isDrawInterior(DrawContext dc,
java.lang.Object shape)
Indicates whether the shape's faces are drawn.
|
boolean |
isDrawOutline(DrawContext dc,
java.lang.Object shape)
Indicates whether the shape's outline is drawn.
|
boolean |
isEnableDepthOffset(DrawContext dc,
java.lang.Object shape)
Indicates whether the shape's depth should be adjusted to give its filled faces priority over coincident items
previously drawn.
|
void drawInterior(DrawContext dc, java.lang.Object shape)
dc
- the current draw context.shape
- the shape being drawn.void drawOutline(DrawContext dc, java.lang.Object shape)
dc
- the current draw context.shape
- the shape being drawn.java.lang.Double getDepthOffsetFactor(DrawContext dc, java.lang.Object shape)
The amount of depth offset when depth offset is enabled is computed by the formula factor * DZ + r *
units, where DZ is a measurement of the change in depth relative to the screen area of the shape, and r is
the smallest value guaranteed to produce a resolvable offset. units is the value return by getDepthOffsetUnits(DrawContext, Object)
.
dc
- the current draw context.shape
- the shape being drawn.java.lang.Double getDepthOffsetUnits(DrawContext dc, java.lang.Object shape)
The amount of depth offset when depth offset is enabled is computed by the formula factor * DZ + r *
units, where DZ is a measurement of the change in depth relative to the screen area of the shape, and r is
the smallest value guaranteed to produce a resolvable offset. factor is the value return by getDepthOffsetFactor(DrawContext, Object)
.
dc
- the current draw context.shape
- the shape being drawn.boolean isDrawInterior(DrawContext dc, java.lang.Object shape)
dc
- the current draw context.shape
- the shape being drawn.boolean isDrawOutline(DrawContext dc, java.lang.Object shape)
dc
- the current draw context.shape
- the shape being drawn.boolean isEnableDepthOffset(DrawContext dc, java.lang.Object shape)
dc
- the current draw context.shape
- the shape being drawn.