Вопрос

This is related to my earlier post where I try to extract vector graphics in a PDF to an SVG file. I obtained this SVG corresponding to a page in a PDF. Unfortunately, though the shapes in the SVG are correct, the fill colors seen in the PDF are not seen when the SVG is rendered by any of the standard browsers. The upper left triangle in the SVG is supposed to have a yellow fill and the lower right triangle is expected to have a light blue-green fill. I do see 2 rectangular clip paths (ids clip_2 and clip_3) in the SVG XML having these colors, but why isn't SVG rendering displaying these colors?

Это было полезно?

Решение

From the spec:

The raw geometry of each child element exclusive of rendering properties such as ‘fill’, ‘stroke’, ‘stroke-width’ within a ‘clipPath’ conceptually defines a 1-bit mask (with the possible exception of anti-aliasing along the edge of the geometry) which represents the silhouette of the graphics associated with that element. Anything outside the outline of the object is masked out.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top