Yes, it pushed the result point one screen down. Just curious why this is 
required. 



From: Larry Becker 
Sent: Thursday, April 09, 2009 9:09 PM
To: OpenJump develop and use 
Subject: Re: [JPP-Devel] modelToViewTransform


Hi Bing,

  I haven't studied this code for a while, but it seems like the line is moving 
the origin (top for window coordinate system, bottom for world).

regards,
Larry


2009/4/9 Bing Ran <bing_...@hotmail.com>

  Hi list, 

  Recently I started introducing an image back buffer in the LayerViewPanel in 
my project for the purpose creating a (another) flicker free panning tool. It 
was the first thing I was planning to do when I started with OJ. So far I have 
made nice progress. 

  Basically I have a back buffer in the LVP that is bigger than the viewport 
and the RenderingManager and all the style renderer only render to the back 
buffer and then the proper portion of the back buffer is copied to the LVP 
graphics. Additionally the back buffer is used as a cache of the previous 
rendering result and the final viewport display uses part of the back buffer 
instead of rendering afresh to reduce flickering. 

  The preliminary effect of change is much appreciated by the CSRs in our call 
center.


  I'm still having issues converting geometries correctly and precisely in the 
process though.


  Now that I'm looking at the code of LVP.modelToViewTransform(...) I'm 
wondering why this line is there:

     modelToViewTransform.translate(0, panelHeight);

  It seems to me these three lines are sufficient to convert a model point to a 
view point. 

     modelToViewTransform.scale(1, -1);
     modelToViewTransform.scale(scale, scale);
     modelToViewTransform.translate(-originInModel.getX(), 
-originInModel.getY());

  or even:

     modelToViewTransform.scale(scale, -scale);
     modelToViewTransform.translate(-originInModel.getX(), 
-originInModel.getY());


  Can someone share insight with this?


  Thanks

  Bing


    

  ------------------------------------------------------------------------------
  This SF.net email is sponsored by:
  High Quality Requirements in a Collaborative Environment.
  Download a free trial of Rational Requirements Composer Now!
  http://p.sf.net/sfu/www-ibm-com
  _______________________________________________
  Jump-pilot-devel mailing list
  Jump-pilot-devel@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel





-- 
http://amusingprogrammer.blogspot.com/



--------------------------------------------------------------------------------


------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com 


--------------------------------------------------------------------------------


_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to