Uhm.. ok.. not the screen coordinates.. the coordinates in the visible
rect..the visible part or the panel..

thomas.deweese wrote:
> 
> Hi Hardc0d3r
> 
> hardc0d3r <[EMAIL PROTECTED]> wrote on 07/16/2008 10:43:06 AM:
> 
>> i did not quite understand.. where will i get the matrix? through the 
> element
>> that i want the coordinates converted? 
> 
>     Yes you get the screen CTM from the element who's local coordinate
> system you want to convert to screen coordinates.
> 
>> do i get the inverse of the matrix and apply it to the point? 
> 
>    I don't think you need to get the inverse of the matrix.
> 
>> i did that but i get the coordinates on the
>> canvas and not on the screen..
> 
>    Umm, are you saying that you can't figure out how to map from
> canvas pixel coordinates to screen pixel coordinates?
> 
>    Try adding the results of calling:
>         canvas.getLocationOnScreen()
> 
>    BTW it is correct (at least for SVG 1.1) for getScreenCTM to
> convert to the canvas coordinate system (same coordinate system
> as clientX/Y, not screenX/Y in a DOM Mouse Event).
> 
>> thomas.deweese wrote:
>> > 
>> > Hi HardCod3r,
>> > 
>> > hardc0d3r <[EMAIL PROTECTED]> wrote on 07/15/2008 04:09:11 AM:
>> > 
>> >> Thanks! That solved the problem! Another question.. How do i convert 
> the
>> >> coordinates of the element to the coordinates of the screen/overlay? 
>> > What
>> >> classes and/or methods do i use?
>> > 
>> >    I would suggest using the SVG DOM 'getScreenCTM' method to get
>> > the transform to the screen coordinate system.  Then you can run your
>> > points through that transform to get the screen coordinate for them.
>> > 
>> >    You need to take some care with what attributes you do this with,
>> > some attributes are in the element's local coordinate system (i.e.
>> > rect elements 'x', 'y') and some attributes 'define' the element's
>> > local coordinate system (i.e. the use element's 'x' & 'y' attributes).
>> > 
>> > 
>> > 
>> 
>> -- 
>> View this message in context: http://www.nabble.com/getting-the-
>> element-in-svg-from-an-overlay-tp18301441p18489087.html
>> Sent from the Batik - Users mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/getting-the-element-in-svg-from-an-overlay-tp18301441p18507937.html
Sent from the Batik - Users mailing list archive at Nabble.com.


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

Reply via email to