Model.window#

Model.window(function, xmin, ymin, xmax, ymax)#

Modifies the current window.

Parameters:
  • function (int) –

    Defines the function being performed:

    0 - The window is redefined so that all of the current model is inside the window. All other parameters are ignored.

    1 - The window is recalculated. All other parameters are ignored. This function is only used internally.

    2 - Zooming is performed on the current window based on the value passed in xmin. If xmin>0, the current window is multiplied by xmin, and the result is zooming in. If xmin<0 , the current window is divided by xmin, and the result is zooming out. This is defined each time the + and - zooming options are used.

    3 - The window is set to the values passed in xmin, ymin, xmax, and ymax. The parameters are specified in model units. This is defined each time the z zooming option is used.

    4 - The window is centered at the point specified by xmin and ymin. The parameters are specified in model units. This is defined each time the c panning option is used.

  • xmin (double) – The minimum x value of the window.

  • ymin (double) – The minimum y value of the window.

  • xmax (double) – The maximum x value of the window.

  • ymax (double) – The maximum y value of the window.

Example#

Modify the window so all the current model is inside it#
import hm
import hm.entities as ent

model = hm.Model()

model.window(function=0, xmin=0.0, ymin=0.0, xmax=0.0, ymax=0.0)