Hello
I was trying to use DrawDeformedImage, and when trying to render to a Context, It doesn’t render anything
The code below renders to the bufferedImage context
Image image1 = Image.getImage("/images/image2.png");
final int w = image1.getWidth();
final int h = image1.getHeight();
BufferedImage img1 = new BufferedImage(w, h);
Painter.drawImage(img1.getGraphicsContext(), image1, 0, 0);
Painter.drawImage(gc, img1, 0, 0);
Rendering to a BufferedImage context using a Normal Painter yields the expected result
But, when Rendered using drawDeformedImage, it does not render anything
Image image1 = Image.getImage("/images/image2.png");
int w = image1.getWidth();
int h = image1.getHeight();
int[] xys = { 0, 0, w - 1, 0, w - 1, h - 1, 0, h - 1 };
TransformPainter.drawDeformedImage(gc, image1, 0, 0, xys);
Even when rendering to a BufferedImage and then painting to the Display graphicsContext does not work
protected void render(GraphicsContext gc) {
// TODO Auto-generated method stub
Image image1 = Image.getImage("/images/image2.png");
int w = image1.getWidth();
int h = image1.getHeight();
BufferedImage buffImage = new BufferedImage(w, h);
int[] xys = { 0, 0, w - 1, 0, w - 1, h - 1, 0, h - 1 };
TransformPainter.drawDeformedImage(buffImage.getGraphicsContext(), image1, 0, 0, xys);
Painter.drawImage(gc, buffImage, 0, 0);
}