Differences between revisions 1 and 2
Revision 1 as of 2010-04-01 08:27:28
Size: 662
Comment:
Revision 2 as of 2012-06-22 14:16:39
Size: 650
Editor: drool
Comment: display java code with syntax highlighting
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
{{{#!highlight python {{{#!java

This function prevents a canvas to zoom beyond a scalar constant value and, in case that a user keeps zooming inside it, the canvas returns the same rendering transform as before the zoom operation.

   1     JSVGCanvas canvas = new JSVGCanvas() {
   2         @Override
   3         public void setRenderingTransform(AffineTransform at) {
   4             if (at.getDeterminant() < ZOOM_IN_LIMIT) {
   5                 // Applies the new zoom level
   6                 setRenderingTransform(at, true);
   7             } else {
   8                 // Redraws the last zoom level
   9                 scheduleGVTRendering();
  10             }
  11         }
  12     }; 

ZoomInLimit (last edited 2012-06-22 14:16:39 by drool)