You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by grillot sebastien <se...@gmail.com> on 2005/06/13 11:40:31 UTC

Explication of a line code...

hello,
I have a little probleme... i don't understand the "thisNode" in the
code below...

              SVGOMPoint pt = new SVGOMPoint(nowToX, nowToY);
                   SVGMatrix mat = thisNode.getScreenCTM();  // elem -> screen
                    mat = mat.inverse();                  // screen -> elem
                    initialDragPoint = (SVGOMPoint)pt.matrixTransform(mat);

Eclipse said : "thisNode cannot be resolved".
These code is taken from http://wiki.apache.org/xmlgraphics-batik/DragTutorial

Thanks a lot

Seb

-- 
Regist. Linux User #344952

/* Fuck me gently with a chainsaw... */
  -- 2.0.38 /usr/src/linux/arch/sparc/kernel/ptrace.c

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Re: Explication of a line code...

Posted by Andres Toussaint <an...@onemileup.com>.
The post has additional information:

http://wiki.apache.org/xmlgraphics-batik/DragTutorial?action=diff


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Re: Explication of a line code...

Posted by Andres Toussaint <an...@onemileup.com>.
Seb:

I forgot to add the information on what is "thisNode" in the tutotrial:
..
// thisNode represents the target of the event
SVGLocatable thisNode = (SVGLocatable)elt.getFirstChild();

  SVGOMPoint pt = new SVGOMPoint(nowToX, nowToY);
  SVGMatrix mat = thisNode.getScreenCTM();  // elem -> screen
...

I will add this to the tutorial,

Regards,

Andres.

On Jun 13, 2005, at 5:40 AM, grillot sebastien wrote:

> hello,
> I have a little probleme... i don't understand the "thisNode" in the
> code below...
>
>               SVGOMPoint pt = new SVGOMPoint(nowToX, nowToY);
>                    SVGMatrix mat = thisNode.getScreenCTM();  // elem 
> -> screen
>                     mat = mat.inverse();                  // screen -> 
> elem
>                     initialDragPoint = 
> (SVGOMPoint)pt.matrixTransform(mat);
>
> Eclipse said : "thisNode cannot be resolved".
> These code is taken from 
> http://wiki.apache.org/xmlgraphics-batik/DragTutorial
>
> Thanks a lot
>
> Seb
>
> -- 
> Regist. Linux User #344952
>
> /* Fuck me gently with a chainsaw... */
>   -- 2.0.38 /usr/src/linux/arch/sparc/kernel/ptrace.c
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: 
> batik-users-help@xmlgraphics.apache.org
>
>

Re: Explication of a line code...

Posted by Jean-Christophe Arnu <ar...@paratronic.fr>.

Sorry,
    I'm dumb. I have to learn to read before.... replying :(
   

-- 
Jean-Christophe Arnu
Paratronic


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Re: Explication of a line code...

Posted by Jean-Christophe Arnu <ar...@paratronic.fr>.

grillot sebastien m'expliquait  (le 13.06.2005 11:40):

>hello,
>I have a little probleme... i don't understand the "thisNode" in the
>code below...
>
>              SVGOMPoint pt = new SVGOMPoint(nowToX, nowToY);
>                   SVGMatrix mat = thisNode.getScreenCTM();  // elem -> screen
>                    mat = mat.inverse();                  // screen -> elem
>                    initialDragPoint = (SVGOMPoint)pt.matrixTransform(mat);
>
>Eclipse said : "thisNode cannot be resolved".
>These code is taken from http://wiki.apache.org/xmlgraphics-batik/DragTutorial
>  
>
Hi,
    IMHO thisNode it the node that inherits this behaviour i.e. the 
methods described there are to be implemented into the node you want to 
be dragged.


-- 
Jean-Christophe Arnu
Paratronic


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org