Clipping of an image file
0 posts in topic
Flat View  Flat View

Posted By:   Albert_Leng
Posted On:   Sunday, January 13, 2002 05:45 PM

Hi there... I have problem in clipping the jpeg image files... i can set the clip to a rectangular area, circular area or Ellipse2D area using codes i write below but i don't know how i can set the clip area to GeneralPath which can create any types of shapes. Can you please tell me how i can use GeneralPath to clip an image or if you have other suggestions, please tell me. Thanks a lot!

Graphics2D g2d = (Graphics2D)g;

//Use a circular clipping area
Shape circle = new Ellipse2D.Float(0,0,w,h);


About | Sitemap | Contact