cancel
Showing results for 
Search instead for 
Did you mean: 

SVG vertical gradient rendered horizonally in landscape mode

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>

 

 

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.
0 REPLIES 0