## devisor2.grid.options
Class GridControl

    java.lang.Object
      devisor2.grid.options.GridControl

public class GridControl
extends java.lang.Object

This is the convenience class for easier access to transformation options and everything that affects working with the domain. For easy access, there is a reference to the most recent instance of this class in the ControlCenter, which you can access as usual.

Field Summary
`int` `eps` the global eps used in various methods
`GridToolkit` `gtk`
`java.awt.geom.AffineTransform` `invtrf`
`MainFrame` `mf` reference to the MainFrame of the application
`boolean` `snapon`
`java.awt.geom.AffineTransform` `trf` The grid transformation matrix and its inverse
`int` `vsnapoffx`
`int` `vsnapoffy`
`int` `vsnapx` snap variables
`int` `vsnapy` snap variables
`Boundary` `workingBoundary` The number of the selected boundary, default is the first boundary, created during domain creation

Constructor Summary
`GridControl(MainFrame uf, ControlCenter uc)`

Method Summary
`java.awt.Rectangle` `boxFromScreenToWorld(java.awt.Rectangle box)`
`int[]` `fromScreenToWorld(int x, int y)`
`int` `fromUserToWorld(double x)`
`int[]` `fromWorldToScreen(int x, int y)`
`double` `fromWorldToUser(int x)`
`double` `getScaleX()`
`double` `getScaleY()`
`double` `runden(double d)`
`void` `setMainFrame(MainFrame uf, ControlCenter uc)`
`void` `setTransformation()`
`int` `SingleFromScreenToWorld(int value)` a single value representing some length or some distance is transformed into world space
`int` `SingleFromWorldToScreen(int value)` a single value representing some length or some distance is transformed from world space

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### gtk

    public GridToolkit gtk

### workingBoundary

    public Boundary workingBoundary

  The number of the selected boundary, default is the first boundary, created during domain creation

### mf

    public MainFrame mf

  reference to the MainFrame of the application

### trf

    public java.awt.geom.AffineTransform trf

  The grid transformation matrix and its inverse

### invtrf

    public java.awt.geom.AffineTransform invtrf

### vsnapx

    public int vsnapx

  snap variables

### vsnapy

    public int vsnapy

  snap variables

### vsnapoffx

    public int vsnapoffx

### vsnapoffy

    public int vsnapoffy

### snapon

    public boolean snapon

### eps

    public int eps

  the global eps used in various methods

Constructor Detail

### GridControl

    public GridControl(MainFrame uf,
                       ControlCenter uc)

Method Detail

### setMainFrame

    public void setMainFrame(MainFrame uf,
                             ControlCenter uc)

### runden

    public double runden(double d)

### setTransformation

    public void setTransformation()

### boxFromScreenToWorld

    public java.awt.Rectangle boxFromScreenToWorld(java.awt.Rectangle box)

### fromWorldToUser

    public double fromWorldToUser(int x)

### fromUserToWorld

    public int fromUserToWorld(double x)

### fromScreenToWorld

    public int[] fromScreenToWorld(int x,
                                   int y)

### fromWorldToScreen

    public int[] fromWorldToScreen(int x,
                                   int y)

### getScaleX

    public double getScaleX()

### getScaleY

    public double getScaleY()

### SingleFromScreenToWorld

    public int SingleFromScreenToWorld(int value)

  a single value representing some length or some distance is transformed into world space

### SingleFromWorldToScreen

    public int SingleFromWorldToScreen(int value)

  a single value representing some length or some distance is transformed from world space