cancel
Showing results for 
Search instead for 
Did you mean: 

Compiler Error for canvas after update to TouchGFX Version 4.23.0

GS1
Senior III

Hello all,

@Martin KJELDSEN,

 

I just updated my project to Version 4.23.0 and now get a compiler error for the creation of a canvas.

The update info tells, that there has been done a change, but there is no example and I don't know how to fix this.

Original code for the construction:

Canvas canvas(this, invalidatedArea);

 

But now the parameters have changed:

 

Canvas(const AbstractPainter *constpainter ,  
  const Rect &canvasAreaAbs ,  
  const Rect &invalidatedAreaRel ,  
  uint8_tglobalAlpha  
  ) 

 

Can anybody tell, how to set correct parameters  and what they represent?

The code for the canvas was taken from github for a graphics canvas "abstractgraph.cpp", therefore I am lost and don't know what these parameters will do.

Any help is very much appreciated.

Thank you and have a Merry Christmas!!!

BR GS

 

 
1 ACCEPTED SOLUTION

Accepted Solutions
JTP1
Lead

Hello

If you look code generated by 4.23.0, you see that for example AbstractShape.cpp uses canvas constructor like this:

 Canvas canvas(getPainter(), getAbsoluteRect(), invalidatedArea, getAlpha());

instead of older versions

 Canvas canvas(this, invalidatedArea);

If this doesn't help, please tell more about your project, which exact file gives the error and from which version your are updating from.

With quick test, automatically generated files are properly update automatically when open older project in 4.23 (at least from 4.21.4 and 4.22.0 projects).

Br JTP

View solution in original post

2 REPLIES 2
JTP1
Lead

Hello

If you look code generated by 4.23.0, you see that for example AbstractShape.cpp uses canvas constructor like this:

 Canvas canvas(getPainter(), getAbsoluteRect(), invalidatedArea, getAlpha());

instead of older versions

 Canvas canvas(this, invalidatedArea);

If this doesn't help, please tell more about your project, which exact file gives the error and from which version your are updating from.

With quick test, automatically generated files are properly update automatically when open older project in 4.23 (at least from 4.21.4 and 4.22.0 projects).

Br JTP

GS1
Senior III

Thank you for this quick solution!!!