边缘的高斯模糊截止 [英] Gaussian blur cutoff at edges

查看:98
本文介绍了边缘的高斯模糊截止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为Android上的绘图程序开发svg导出实用程序.我有一个问题,就是后面的模糊超出了形状边界的界限-看起来我需要调整viewBox的大小或增加边距或其他功能.有谁知道最好的方法?

I am working on an svg export utility for a drawing program on android. I am having a problem that the behind blur is cutoff past the shape boundaries - looks like i need to resize the viewBox or increase the margin or something. Does anyone know the best way?

测试文件的网址为此处-由于MIME类型不是在服务器上正确设置,但目前无法重启:(.文件中嵌入了图像和字体,这就是为什么它很大.但是如果将其保存到磁盘,则可以用chrome,ff等打开.

The test file url is here - it downloads as the mime type isn't setup correctly on the server and I cant restart it at the moment :(. There are embedded images and fonts in the file, Which is why it's big. But if you save it to disk you can open in chrome, ff, etc...

给出了此问题的放大示例.请注意橙色发光的方形边缘.

An enlarged example of this problem is given. Notice the square edges on the orange glow.

推荐答案

过滤器画布具有默认值:x = y = -10%和width = height = 120%.您可以使用过滤器元素上的x,y,width和height属性来更改它们.

The filter canvas has default values : x=y=-10% and width=height=120%. You can change them with the x, y, width and height attributes on the filter element.

尝试设置更大的画布:

<filter x="-50%" y="-50%" width="200%" height="200%"/>

但是,由于画布较大,因此会降低性能.

Yet, since the canvas is bigger, there will be performance loss.

这篇关于边缘的高斯模糊截止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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