问题
I'm trying to draw an image as a polygon in Swing but I don't know how. Now I only have code to draw filled polygon. This is not a cropped image, it is distorted.
What I need (Polygon with texture):

What I have - Filled polygon

gr.fillPolygon(x_points, y_points, points.length);
回答1:
The easiest way to render 3D is using JOGL library which uses OpenGL to render in JPanel.
来源:https://stackoverflow.com/questions/55949306/draw-image-as-a-polygon