Module BasicMagScript :: Class ZoomMove
[hide private]
[frames] | no frames]

Class ZoomMove

source code

object --+
         |
        ZoomMove

Class that deals with seamless panning and repositioning of the magnifier.

Instance Methods [hide private]
 
goTo(self, layer, end_coord, start_coord=None, smooth=False)
Main public method for putting the magnifier on a coordinate.
source code
 
_hopTo(self, end_coord, layer)
Stop panning and hop to given coordinate.
source code
 
_panTo(self, end_coord, start_coord)
Pan to given coordinate.
source code
 
_panStep(self, layer)
Increment X and Y coordinates in a certain vector.
source code
 
stopPan(self)
Stop current pan motion.
source code
 
startPan(self)
Start a timeout and execute _panstep
source code
 
goToPos(self, pos, layer)
Actual method that translates the zoomer, to be implemented by script.
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables [hide private]
integer pan_rate = 40
Duration in milliseconds between "frames"
integer _curr_velocity = None
Current velocity
tuple _curr_coord = None
Current coordinates
number _vect_length = None
vector length
tuple _end_coord = None
Coordinate that we are trying to get to
Instance Variables [hide private]
boolean smooth_pan = None
Allow smooth panning
integer accel = None
Acceleration in px/sec**2
integer velocity = None
Velocity in px/sec
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

goTo(self, layer, end_coord, start_coord=None, smooth=False)

source code 
Main public method for putting the magnifier on a coordinate.
Parameters:
  • layer (integer) - Layer
  • end_coord (tuple) - Coordinate we want to reach.
  • start_coord (tuple) - Coordinate we are starting at, if none is given, there will be no panning.
  • smooth (boolean) - Use smooth panning?

_hopTo(self, end_coord, layer)

source code 
Stop panning and hop to given coordinate.
Parameters:
  • end_coord (tuple) - Coordinate we want to reach.
  • layer (integer) - Layer

_panTo(self, end_coord, start_coord)

source code 
Pan to given coordinate.
Parameters:
  • end_coord (tuple) - Coordinate we want to reach.
  • start_coord (tuple) - Coordinate we are starting at.

_panStep(self, layer)

source code 
Increment X and Y coordinates in a certain vector. Accelerate, deccelerate accordingly.
Parameters:
  • layer (integer) - Layer

goToPos(self, pos, layer)

source code 
Actual method that translates the zoomer, to be implemented by script.
Parameters:
  • pos (tuple) - Position
  • layer (integer) - Layer