0

I need to draw a series of small circles at random within the area of a path. Let's say the path is a triangle. Is there a way to do this using Raphaël? I understand something like this may be computationally expensive, so that's another factor that's important here.

Thanks!

Gavin
  • 2,557
  • 1
  • 26
  • 30

1 Answers1

1

Looks like unfortunately you can't define a clipping path using Raphaël, according to this other post: clip-path in Raphaël.js

However SVG does support it through the clipPath element. A demo is at http://sawyerhollenshead.com/writing/23/using-svg-clippath/

Community
  • 1
  • 1
Clafou
  • 15,250
  • 7
  • 58
  • 89
  • Raphaël only supports rectangular clipping (probably due to VML constraints), see the 'clip-rect' attribute, http://raphaeljs.com/reference.html#Element.attr. – Erik Dahlström Oct 18 '12 at 11:18