Multi-step gradient incorrectly imported from PDF (latex export)
Steps to reproduce:
- open Inkscape
- import attached PDF via File→Import…
- compare result with what external PDF viewers show
What happened?
The attached PDF contains a type 2 axial shading which has four stops: cyan at 0%, magenta at 25%, yellow at 75%, and black at 100%. But Inkscape only shows a gradient from cyan to magenta. Editing the gradient shows that the stops are incorrectly calculated to be at 0.0, 25, 75, 1.0.
What should have happened?
The gradient should be correctly imported.
Inkscape Version and Operating System:
- Inkscape Version: Inkscape 0.92.4 (5da689c313, 2019-01-14)
- Operating System: Debian Linux
- Operating System version: buster/sid
Example file
Further details
There is something slightly unusual about the way the shading is made in the PDF. Scribus also has problems with it.
The attached PDF was created with LaTeX and PGF/TikZ with the following code:
\pdfminorversion=3
\pdfcompresslevel=0
\pdfobjcompresslevel=0
\documentclass{article}
\pagestyle{empty}
\usepackage{tikz}
\pgfdeclarehorizontalshading{test}{100bp}
{color(0bp)=(cyan); color(25bp)=(magenta);
color(75bp)=(yellow); color(100bp)=(black)}
\begin{document}
\pgfuseshading{test}
\end{document}
Edited by Nathan Lee