use of processing.awt.PGraphicsJava2D in project WordCram by danbernier.
the class ProcessingWordRenderer method drawWord.
public void drawWord(EngineWord word, Color color) {
GeneralPath path2d = new GeneralPath(word.getShape());
// Graphics2D g2 = (Graphics2D)destination.image.getGraphics();
Graphics2D g2 = ((PGraphicsJava2D) destination).g2;
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g2.setPaint(color);
g2.fill(path2d);
}
Aggregations