【问题标题】:Raphael transform not working?拉斐尔变换不起作用?
【发布时间】:2012-05-10 21:35:35
【问题描述】:

我在 Raphael 中有这段代码:

var myrect = paper.rect(10,10, 25,25);

矩形出现。

当我添加这段代码时:

myrect.transform(T200,0);

...什么也没发生。

有人知道我做错了什么吗?这些 Raphael 变换似乎对我不起作用。

谢谢!

【问题讨论】:

    标签: raphael transform


    【解决方案1】:

    可能 Element.transform 将字符串作为参数。

    试试:

    myrect.transform("t200,0");
    

    看看这是否有什么不同。

    来源: http://raphaeljs.com/reference.html#Element.transform

    【讨论】:

    • 我尝试将转换作为属性添加到路径并且它起作用了:myPath.attr({ "stroke-width": "2", "fill": "#E5EDD8", "stroke" :“#272424”,“stroke-linecap”:“round”,“stroke-linejoin”:“round”,“stroke-miterlimit”:“10”,“transform”:“T370,370”});跨度>
    猜你喜欢
    • 2014-03-24
    • 1970-01-01
    • 1970-01-01
    • 2013-04-05
    • 1970-01-01
    • 2014-09-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多