public class LineCache
extends java.lang.Object
Constructor and Description |
---|
LineCache(java.awt.Stroke solidStroke,
java.awt.Stroke dashedStroke)
Creates a new LineCache.
|
Modifier and Type | Method and Description |
---|---|
void |
addPath(java.awt.geom.Path2D path,
boolean solid)
Adds a path to this cache.
|
void |
draw(java.awt.Graphics2D g)
Draws the paths in this cache.
|
public LineCache(java.awt.Stroke solidStroke, java.awt.Stroke dashedStroke)
solidStroke
- the Stroke to use for drawing solid linesdashedStroke
- the Stroke to use for drawing dashed linespublic void addPath(java.awt.geom.Path2D path, boolean solid)
path
- the path to addsolid
- true
to add to the solid paths, false
to add
to the dashed pathspublic void draw(java.awt.Graphics2D g)
g
- the graphics context in which to draw the paths