Can Clipping can be rotated?
Thank you very much~~
could you ask a more specific question? I have no idea what you’re asking ???
Since any Shape can be used for clipping and you can rotate shapes, the answer must be yes.
Cheers,
Mikael Grev
Oh, thanks!
One more question, if I want to rotate, transform a clip, which method I should use?
you could experiment with AffineTransform.
Shape clip = new Ellipse2D.Double(5, 5, 10, 10);
Graphics2D g2d = strategy.getDrawGraphics();
g2d.setClip(clip);
AffineTransform trans = new AffineTransform(scaleX, shearX, shearY, scaleY, xCoord, yCoord);
g2d.transform(trans);
//draw stuff
Experiment with that! If you need more info on what all those guys do, check the 1.4.2 JavaDoc