Loading ...
Sorry, an error occurred while loading the content.

DOM access to the is-point-inside-path function

Expand Messages
  • johntobey253
    The fill property has rules to determine which points are in its shape.  I would like a fill-rule that
    Message 1 of 3 , Jan 30, 2013
    • 0 Attachment
      The fill property <http://www.w3.org/TR/SVG/painting.html#FillProperty>
      has rules to determine which points are in its shape.  I would like a
      fill-rule that fills either the interior or the exterior depending on
      whether a path is drawn clockwise or not.  Barring that, I would like
      a way to emulate this in script.

      Has anyone proposed/implemented a DOM interface that returns true if a
      given point is inside a given shape?

      I will consider counting edge-crossings but am curious about an easier
      solution.

      Cheers,
      John




      [Non-text portions of this message have been removed]
    • Robert Longson
      ... You mean like document.elementFromPoint( x, y ) http://dev.w3.org/csswg/cssom-view/#widl-Document-elementFromPoint-Element-float-x-float-y Best regards
      Message 2 of 3 , Jan 31, 2013
      • 0 Attachment
        >
        > Has anyone proposed/implemented a DOM interface that returns true if a
        > given point is inside a given shape?

        You mean like document.elementFromPoint( x, y )

        http://dev.w3.org/csswg/cssom-view/#widl-Document-elementFromPoint-Element-float-x-float-y

        Best regards

        Robert.
      • johntobey253
        ... Yeah, that looks promising. Thanks!
        Message 3 of 3 , Feb 7, 2013
        • 0 Attachment
          > > Has anyone proposed/implemented a DOM interface that returns true if a
          > > given point is inside a given shape?
          >
          > You mean like document.elementFromPoint( x, y )
          >
          > http://dev.w3.org/csswg/cssom-view/#widl-Document-elementFromPoint-Element-float-x-float-y

          Yeah, that looks promising. Thanks!
        Your message has been successfully submitted and would be delivered to recipients shortly.