开发者

Raphael JS nested canvases?

I'm using Raphael JS to draw vector graphics on a webpage, and I have a rectangle (Raphael.rect) that I'd like to use as a seperate canvas from its parent. Is there any way to do this?

EDIT: I'd just draw in the rectangle like normal, but it wouldn't cut off the开发者_Python百科 contents at its border.


You currently can not use a Raphael rect as the equivalent of a regular Raphael object: nesting is unfortunately not supported. What you will probably have to do is use the position of the rect as an offset for all your drawing operations that should appear inside the rect.


Apparently clip-rect works for this. Oh the power of searching after all hope is lost.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜