TransformPainter.DrawDeformedImage is not drawing to any graphicsContext

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

image

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);

image

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);
	}

Hello @misael1805

Which version of the UI pack are you using? We encountered a similar issue that we fixed starting UI pack 13.0.4.

Best Regards,
Gaëtan Harel

Hello @gaetan.harel, I’m not using UI pack

I’m using the following dependencies

<dependency org="ej.library.ui" name="widget" rev="3.1.0" />	
<dependency org="ej.library.util" name="exit" rev="1.2.0" /> 
<dependency org="ej.library.wadapps" name="framework" rev="1.10.0"/>

Best Regards,
Victor

Hi @misael1805 ,

These are Java dependencies. Could you please check your latest architecture and UI pack here Window > Preferences > MicroEJ > Architectures?

You can also find the latest architectures and packs for the Cortex-M7 MCUs here: Index of /modules/com/microej/architecture/CM7

Best Regards,
Gaëtan

Hi @gaetan.harel

The version is 13.0.2

Regards,
Victor

Ok so be sure to use this platform:

and to use the UI latest pack and architecture available at: Index of /modules/com/microej/architecture/CM7

And it should work.

Gaëtan

Hi @gaetan.harel , It worked, Thanks!

Regards,
Victor