Title: Re: "Drag" selection box...how to?

Well, this sort of works.  I only want to select elements in my current “layer” denoted by a <g> element.  The intersection list seems to return everything in or “below” the current layer; from the elements in the layer up to the elements under the “svg” root element.  Is there a way to define a certain subset?  I just want elements within a single <G> tag.  The only solution I see is to iterate the returned NodeList and check each Node to see if it’s in the current layer.

 

Michael Bishop

 


From: Bishop, Michael W. CONTR J9C880 [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 08, 2006 12:29 AM
To: batik-users@xmlgraphics.apache.org
Subject: RE: "Drag" selection box...how to?

 

This is what I was looking for, thanks.  Which class is this specified in?  I have the Javadoc with the 1.6 distribution and this method is empty for SVGSVGElement and SVGOMSVGElement, hence the confusion.

 

Michael Bishop

 


From: Cameron McCormack [mailto:[EMAIL PROTECTED]
Sent: Tue 2/7/2006 4:42 PM
To: batik-users@xmlgraphics.apache.org
Subject: Re: "Drag" selection box...how to?

Hi Michael.

Bishop, Michael W. CONTR J9C880:
> No, it's not a typo.  I must not have been clear.  I'm talking about the
> two parameters to getIntersectionList().  One is an SVGRect, which I
> assume is the box I want to check.  The other is an SVGElement called
> "referenceElement".  I don't know what that one represents.

Just check the spec.  In the description for getIntersectionList[1] it
says:

  Returns the list of graphics elements whose rendered content
  intersects the supplied rectangle, honoring the 'pointer-events'
  property value on each candidate graphics element.

  Parameters
      in SVGRect rect
          The test rectangle. The values are in the initial coordinate
          system for the current 'svg' element.
      in SVGElement referenceElement
          If not null, then only return elements whose drawing order has
          them below the given reference element.

[1] http://www.w3.org/TR/SVG11/struct.html#InterfaceSVGSVGElement

--
 Cameron McCormack                      ICQ: 26955922
 cam (at) mcc.id.au                     MSN: cam (at) mcc.id.au
 http://mcc.id.au/                      JBR: heycam (at) jabber.org

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to