hades.gui
Class Trafo2D

java.lang.Object
  extended byjfig.canvas.FigTrafo2D
      extended byhades.gui.Trafo2D
All Implemented Interfaces:
java.lang.Cloneable

public final class Trafo2D
extends FigTrafo2D


Field Summary
(package private) static double[] factors
           
(package private) static double[] offsets
           
 
Fields inherited from class jfig.canvas.FigTrafo2D
anchor, COARSE_GRID, COARSE_SNAP, d_zoom_factor, debug, DOTS_PER_INCH, DOTS_PER_MM, DOTS_PER_XMM, dpi, DPI, FINE_GRID, FINE_SNAP, gridMode, MAX_ZOOM_FACTOR, MEDIUM_GRID, MEDIUM_SNAP, MIN_ZOOM_FACTOR, NO_GRID, NO_SNAP, p, snapDelta, snapMode, TEN_GRID, TEN_SNAP, timestamp, units, UNITS_INCHES, UNITS_MM, UNITS_STRING, UNITS_XMM, zoom_factor, zoom_factor75
 
Constructor Summary
Trafo2D()
          minimal constructor.
 
Method Summary
 double getGridSpacingValue()
          return the spacing (in world coordinates) of two grid points.
 void set_zoom_region_unconstrained(int wx, int wy, int wx2, int wy2, int width, int height, int border)
          set_zoom_region_unconstrained(): set the viewport to the given region, but correct for the top and left rulers, and leave 'border' pixels space.
 void set_zoom_region(int wx, int wy, int wx2, int wy2, int width, int height)
          set_zoom_region(): set the viewport to the given region.
 void set_zoom(double zoom)
          change the zoom factor.
 
Methods inherited from class jfig.canvas.FigTrafo2D
doChangeUnits, get_units_string, get_units, getAnchor, getClone, getGridMode, getMaxZoomFactor, getMinZoomFactor, getScreenCoords, getSnap, getSnapRelative, getTimestamp, getUnits, getValueInUnits, getWorldCoords, getWorldCoords, getWorldCoordsSnapped, getWorldCoordsSnapped, getZoom, getZoomFactor_MultipleOfTwo, getZoomFactor, insideSnap, message, screen_to_wc_snapped, screen_to_wc_snapped, screen_to_wc_x, screen_to_wc_y, screen_to_wc, screen_to_wc, set_zoom_region_ooooolllllldddd, setAnchor, setGridMode, setSnapAbsolute, setSnapRelative, setUnits, wc_to_screen_x, wc_to_screen_y, wc_to_screen, wc_to_screen, wc_to_screen, wc_to_screen
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

offsets

static final double[] offsets

factors

static final double[] factors
Constructor Detail

Trafo2D

public Trafo2D()
minimal constructor. Allocates the anchor and the temporary point p.

Method Detail

getGridSpacingValue

public double getGridSpacingValue()
Description copied from class: FigTrafo2D
return the spacing (in world coordinates) of two grid points.

Overrides:
getGridSpacingValue in class FigTrafo2D

set_zoom

public void set_zoom(double zoom)
change the zoom factor.

Overrides:
set_zoom in class FigTrafo2D
Parameters:
zoom - The new zoom factor. Currently only positive integers are allowed.

set_zoom_region

public void set_zoom_region(int wx,
                            int wy,
                            int wx2,
                            int wy2,
                            int width,
                            int height)
set_zoom_region(): set the viewport to the given region.

Actually, this method tries to fit the specified region as far as possible into the current window size, while limiting the zoom-factors to multiples of sqrt(2).

anchor'(

Overrides:
set_zoom_region in class FigTrafo2D
Parameters:
wx - the top left corner (x)
wy - the top left corner (y)
wx2 - the bottom right corner (x)
wy2 - (y)
width - the current window size (width)
height - (height)

set_zoom_region_unconstrained

public void set_zoom_region_unconstrained(int wx,
                                          int wy,
                                          int wx2,
                                          int wy2,
                                          int width,
                                          int height,
                                          int border)
set_zoom_region_unconstrained(): set the viewport to the given region, but correct for the top and left rulers, and leave 'border' pixels space.