* @param g2d
*/
private void paintCrazyPaving(DisplayedGem displayedGem, Graphics2D g2d) {
// If this Gem is 'broken' draw the 'crazy paving'
if (displayedGem.getGem().isBroken()) {
Voronoi cachedCrazyPaving = crazyPavingCache.get(displayedGem);
if (cachedCrazyPaving == null) {
// Generate an appropriate crazy paving effect
cachedCrazyPaving = Voronoi.makeRandomAreaVoronoi(displayedGem.getDisplayedBodyPart().getBounds(), DisplayConstants.CRACK_POINTS_PER_QTR);
crazyPavingCache.put(displayedGem, cachedCrazyPaving);
}
// Clip to triangle region
Shape oldClip = g2d.getClip();
g2d.setClip(displayedGem.getBodyShape());
// Draw the crazy paving!
g2d.setColor(getCrackColour(displayedGem));
cachedCrazyPaving.show(g2d, true, false);
// Restore clipping
g2d.setClip(oldClip);
}
}