Skip to content

Commit

Permalink
#1 Now I got a testcase for the negative shape sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
rototor committed Jun 22, 2017
1 parent 2b30836 commit 96c040c
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,17 @@ public void draw(Graphics2D gfx) throws IOException, FontFormatException {
gfx.fill(AffineTransform.getTranslateInstance(30f, 20f).createTransformedShape(rect));
Composite composite = gfx.getComposite();
gfx.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.5f));
gfx.setColor(Color.blue);
gfx.setColor(Color.cyan);
gfx.fillRect(15, 0, 40, 40);
gfx.setColor(Color.green);
gfx.drawRect(20, 10, 50, 50);
gfx.setColor(Color.magenta);
gfx.fill(new Ellipse2D.Double(20, 20, 100, 100));
gfx.setColor(Color.orange);
gfx.fill(new Ellipse2D.Double(20, 20, -100, 100));
gfx.setPaint(gp);
gfx.fill(new Ellipse2D.Double(10, 80, 20, 20));
gfx.fill(new Ellipse2D.Double(10, 100, -20, -20));
gfx.setComposite(composite);
}

Expand Down

0 comments on commit 96c040c

Please sign in to comment.