How to draw a polygon on an image and save the result
Yet another question from a newbie.
My previous code can generate a buffered image. Right now, I wanna display the image with Java2D. In addition, I need to draw a polygon on that image based a set of vertices. Then I need to save the image containing the original image and the polygon.
To draw the both, is it like first g.drawImage(), then g.draw(Polygon polygon). If it is correct, then how can I save the result to a new image file? Thank you in advance.