如何在Raphael JS中使用SVG过滤器? [英] How to use svg filters with raphael js?

查看:64
本文介绍了如何在Raphael JS中使用SVG过滤器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道,我应该使用哪些技术将svg过滤器应用于拉斐尔路径?

i would like to know, which techniques should i use to apply svg filters to raphael paths?

我知道raphael试图尽可能多地使用IE进行跨浏览器,但是我想知道是否存在一种使用javascript添加过滤器的方法.

I know that raphael tries to be as much cross browser with IE it can, but i was wondering if there was a way to add the filters using javascript.

推荐答案

我为此建立了一个库.您可以执行以下操作:

I built a library to do this. You can do something like:

var paper = Raphael("test");
var circle = paper.circle(100, 100, 50, 50).attr({fill: "red", stroke: "black"});

circle.emboss();

看看小提琴: http://jsfiddle.net/chrismichaelscott/5vYwJ/

或项目页面: http://chrismichaelscott.github.io/fraphael

这篇关于如何在Raphael JS中使用SVG过滤器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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