填充与SVG剪辑路径相关的颜色-预期的行为是什么? [英] Fill colors associated with SVG clip paths - what is the expected behaviour?

查看:76
本文介绍了填充与SVG剪辑路径相关的颜色-预期的行为是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这与我的 之前的文章,我尝试将PDF中的矢量图形提取到SVG文件中.我获得了与PDF页面相对应的此SVG .不幸的是,尽管SVG中的形状正确,但是当使用任何标准浏览器渲染SVG时,都看不到PDF中的填充色. SVG中的左上三角形应为黄色填充,而右下三角形应为浅蓝绿色填充.我在SVG XML中确实看到2个矩形剪辑路径(ids clip_2和clip_3)具有这些颜色,但是为什么SVG渲染不显示这些颜色?

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?

推荐答案

来自规格:

每个子元素的原始几何图形(不包括渲染) 属性中的填充",行程",行程宽度" "clipPath"在概念上定义了一个1位掩码(可能 沿着几何体边缘进行抗锯齿的例外) 代表与此相关的图形的轮廓 元素.对象轮廓之外的所有内容都会被屏蔽掉.

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.

这篇关于填充与SVG剪辑路径相关的颜色-预期的行为是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆