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/15 15:22:20 UTC

Not out of the Canvas !

Hello !
The DnD isn't a probleme now, thanks you :)

I have a question before setting the new point (x, y) i want to be
sure that the form is in the canvas... is there a method who do this ?

I'm not sur to be clear !
------------------------------------------------------
|                                                                  | <~~~ canvas
|                                                                  |
|                  __ <~~~ form                        |
|                |      |                                          |
|                |      |                                          |
|                |      |                                          |
|                -------                                         |
------------------------------------------------------


when i DnD i dond want the user can do these 

------------------------------------------------------
|                                                                  | <~~~ canvas
|                                                                  |
|                                                                  |
|                                                                  |
|                                                           ------|
|                                                          |       |
------------------------------------------------------

i want it stop at the limit like this :

------------------------------------------------------
|                                                                  | 
|                                                                  |
|                                                             __ |
|                                                          |      ||
|                                                          |      ||
|                                                          |      ||
|                                                          -------|
------------------------------------------------------


sorry for my english and the drawing...

thanks you :)

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: Not out of the Canvas !

Posted by Te...@apcc.com.
Sebastian,

You can get the dimensions (height, width) of the loaded canvas this way :

Add a    addGVTTreeBuilderListener   and in the   gvtBuildCompleted  method
call   getSVGDocumentSize( ):

   public void gvtBuildCompleted(GVTTreeBuilderEvent e) {
                 //  this is the size of the loaded document
                 Dimension2D size = getSVGDocumentSize();

Ted




                                                                           
             grillot sebastien                                             
             <sebastiengrillot                                             
             @gmail.com>                                                To 
                                       batik-users@xmlgraphics.apache.org  
             06/15/2005 09:22                                           cc 
             AM                                                            
                                                                   Subject 
                                       Not out of the Canvas !             
             Please respond to                                             
             batik-users@xmlgr                                             
             aphics.apache.org                                             
                                                                           
                                                                           
                                                                           




Hello !
The DnD isn't a probleme now, thanks you :)

I have a question before setting the new point (x, y) i want to be
sure that the form is in the canvas... is there a method who do this ?

I'm not sur to be clear !
------------------------------------------------------
|                                                                  | <~~~
canvas
|                                                                  |
|                  __ <~~~ form                        |
|                |      |                                          |
|                |      |                                          |
|                |      |                                          |
|                -------                                         |
------------------------------------------------------


when i DnD i dond want the user can do these

------------------------------------------------------
|                                                                  | <~~~
canvas
|                                                                  |
|                                                                  |
|                                                                  |
|                                                           ------|
|                                                          |       |
------------------------------------------------------

i want it stop at the limit like this :

------------------------------------------------------
|                                                                  |
|                                                                  |
|                                                             __ |
|                                                          |      ||
|                                                          |      ||
|                                                          |      ||
|                                                          -------|
------------------------------------------------------


sorry for my english and the drawing...

thanks you :)

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




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