Creates a <pattern>
element from the current element To create a pattern you have to specify the pattern rect:
Returns: Element the <pattern>
element
You can use pattern later on as an argument for fill
attribute:
var p = paper.path("M10-5-10,15M15,0,0,15M0-5-20,15").attr({
fill: "none",
stroke: "#bada55",
strokeWidth: 5
}).pattern(0, 0, 10, 10),
c = paper.circle(200, 200, 100);
c.attr({
fill: p
});