2025-10-15 11:40 AM
After updating from TouchGFX 4.24.x to 4.26.0, the code generated cannot be compiled w/o manual correction - there are commas missing:
const touchgfx::AbstractShape::ShapePoint<float> downArrowDisplayPoints[4] = { { 0.0f, 0.0f }, { 80.0f, 0.0f }, { 40.0f, 10.0f }{ 40.0f, 10.0f } };
downArrowDisplay.setShape(downArrowDisplayPoints);
downArrowDisplay.setVisible(false);
add(downArrowDisplay);
upArrowDisplay.setPosition(80, 61, 80, 10);
upArrowDisplay.setOrigin(0.0f, 0.0f);
upArrowDisplay.setScale(1.0f, 1.0f);
upArrowDisplay.setAngle(0.0f);
upArrowDisplayPainter.setColor(touchgfx::Color::getColorFromRGB(217, 141, 0));
upArrowDisplay.setPainter(upArrowDisplayPainter);
const touchgfx::AbstractShape::ShapePoint<float> upArrowDisplayPoints[4] = { { 40.0f, 0.0f }{ 80.0f, 10.0f }, { 0.0f, 10.0f }, { 40.0f, 0.0f } };
upArrowDisplay.setShape(upArrowDisplayPoints);
upArrowDisplay.setVisible(false);
add(upArrowDisplay);
upArrowLed.setPosition(80, 191, 80, 10);
upArrowLed.setOrigin(0.0f, 0.0f);
upArrowLed.setScale(1.0f, 1.0f);
upArrowLed.setAngle(0.0f);
upArrowLedPainter.setColor(touchgfx::Color::getColorFromRGB(217, 141, 0));
upArrowLed.setPainter(upArrowLedPainter);
const touchgfx::AbstractShape::ShapePoint<float> upArrowLedPoints[4] = { { 40.0f, 0.0f }{ 80.0f, 10.0f }, { 0.0f, 10.0f }, { 40.0f, 0.0f } };
upArrowLed.setShape(upArrowLedPoints);
upArrowLed.setVisible(false);
add(upArrowLed);
downArrowLed.setPosition(81, 286, 80, 10);
downArrowLed.setOrigin(0.0f, 0.0f);
downArrowLed.setScale(1.0f, 1.0f);
downArrowLed.setAngle(0.0f);
downArrowLedPainter.setColor(touchgfx::Color::getColorFromRGB(217, 141, 0));
downArrowLed.setPainter(downArrowLedPainter);
const touchgfx::AbstractShape::ShapePoint<float> downArrowLedPoints[4] = { { 0.0f, 0.0f }, { 80.0f, 0.0f }, { 40.0f, 10.0f }{ 40.0f, 10.0f } };
downArrowLed.setShape(downArrowLedPoints);
downArrowLed.setVisible(false);
add(downArrowLed);
Snippet the .touchgfx file:
{
"Type": "Shape",
"Name": "downArrowDisplay",
"X": 80,
"Y": 155,
"Width": 80,
"Height": 10,
"Visible": false,
"Color": {
"Red": 217,
"Green": 141
},
"Points": [
{},
{
"X": 80.0
},
{
"X": 40.0,
"Y": 10.0
},
{
"X": 40.0,
"Y": 10.0
}
],
"XScale": 1.0,
"YScale": 1.0
},
{
"Type": "Shape",
"Name": "upArrowDisplay",
"X": 80,
"Y": 61,
"Width": 80,
"Height": 10,
"Visible": false,
"Color": {
"Red": 217,
"Green": 141
},
"Points": [
{
"X": 40.0
},
{
"X": 80.0,
"Y": 10.0
},
{
"Y": 10.0
},
{
"X": 40.0
}
],
"XScale": 1.0,
"YScale": 1.0
},
{
"Type": "Shape",
"Name": "upArrowLed",
"X": 80,
"Y": 191,
"Width": 80,
"Height": 10,
"Visible": false,
"Color": {
"Red": 217,
"Green": 141
},
"Points": [
{
"X": 40.0
},
{
"X": 80.0,
"Y": 10.0
},
{
"Y": 10.0
},
{
"X": 40.0
}
],
"XScale": 1.0,
"YScale": 1.0
},
{
"Type": "Shape",
"Name": "downArrowLed",
"X": 81,
"Y": 286,
"Width": 80,
"Height": 10,
"Visible": false,
"Color": {
"Red": 217,
"Green": 141
},
"Points": [
{},
{
"X": 80.0
},
{
"X": 40.0,
"Y": 10.0
},
{
"X": 40.0,
"Y": 10.0
}
],
"XScale": 1.0,
"YScale": 1.0
},
{
"Type": "CustomContainerInstance",
"Name": "customContainerStatusbar1",
"Y": -1,
"Width": 240,
"Height": 320,
"CustomContainerDefinitionName": "CustomContainerStatusbar"
}
],
2025-10-16 1:56 AM
Hello @awiernie ,
When you post code into the forum please consider putting code blocks with :
It helps readability.
Thanks for your bug report, after some experiment its caused when you have points defined with the same value.
I will discuss about it with the team.
BR,
2025-10-17 6:08 AM
The shapes are triangles. Two of them hat the 4th point set equal to the 1st. The other two had accidently set the last point like the point before the last.
I removed the 4th point from all of them which works.
But anyway it should be allowed to close the shape.