Skip to main content
Lead II
December 20, 2024
Solved

SVG vertical gradient rendered horizonally in landscape mode

  • December 20, 2024
  • 3 replies
  • 1529 views

Attached SVG image with vertical gradient renders correctly in TouchGFX Designer 4.24.1, but not in the simulator.
In simulator the gradient is horizontal in landscape mode and vertical in portrait mode.

Edit. SVG attachments are banned, but renaming it to TXT is banned too so my attachment wasn't attached.

"The attachment's gradient.svg.txt content type (text/plain) does not match its file extension and has been removed."

So I've attached it as source code:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="400" height="100" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
 <defs>
 <linearGradient id="grad1" x1="0%" y1="0%" x2="0%" y2="100%">
 <stop offset="0%" stop-color="yellow" />
 <stop offset="50%" stop-color="green" />
 <stop offset="100%" stop-color="red" />
 </linearGradient>
 </defs>
 <rect width="200" height="100" x="10" y="10" fill="url(#grad1)"/>
</svg>

 

 

Best answer by GaetanGodart

Hello @unsigned_char_array ,

 

TouchGFX 4.25.0 fixes the issue.

 

Regards,

3 replies

GaetanGodart
Technical Moderator
December 27, 2024

Hello @unsigned_char_array ,

 

We are currently working on a similar issue  with SVG which might be related to your or be the same issue.
I will keep you updated once we fix it.

Regards,

GaetanGodart
Technical Moderator
January 21, 2025

Hello @unsigned_char_array ,

 

Just to keep you updated, we have spotted some bugs with SVG and are fixing them.
Your issue should be part of them, I don't know exactly when it will be fixed but it will happen! :)

Regards,

GaetanGodart
GaetanGodartBest answer
Technical Moderator
March 5, 2025

Hello @unsigned_char_array ,

 

TouchGFX 4.25.0 fixes the issue.

 

Regards,

Lead II
March 5, 2025

@GaetanGodart wrote:

TouchGFX 4.25.0 fixes the issue.


Confirmed. Tested with a devboard and simulator. Both landscape and portrait render properly.

"Kudo posts if you have the same problem and kudo replies if the solution works.Click ""Accept as Solution"" if a reply solved your problem. If no solution was posted please answer with your own."