【发布时间】:2012-03-27 04:00:26
【问题描述】:
我正在尝试缩小使用 RaphaelJS 渲染的图标。使用"transform": "s.5,.5,0,0" 效果很好,但我更希望能够提供绝对像素值,例如20px。一个不错的选择是让路径自动缩放到纸张尺寸。这些都可能吗?
我当前使用transform的代码:
$('.cog-menu-options-icon').each(function (i) {
paper = Raphael($(this)[0], 20, 20);
paper.path(window.icons.wrench).attr({ "fill": "#333", "transform": "s.5,.5,0,0" });
});
可以将路径设置为自动缩放以适应纸张吗?路径的高/宽可以以像素为单位设置吗?
【问题讨论】:
标签: javascript jquery raphael