Random point inside SVG <path> -
the problem simple describe. have simple svg closed shape, this:
<path d="m435.95,147.99l0.33,0.49l-0.11,1.07l-0.39,0.04l-0.29,-0.15l0.21,-1.4l0.25,-0.05z"></path>
i want draw point @ random, somewhere inside shape.
how that? hoping solution simple possible.
you use getbbox bounding box of path , generate random point in range. use elementfrompoint random point check on shape.
if elements cover path set them pointer-events="none" ignored when this.
Comments
Post a Comment