Mixin: WindowMixin

core.WindowMixin

This mixin implements various unit-handling measurement methods.

Note: (a) this is the equivalent of PsychoPY's WindowMixin. (b) it will most probably be made obsolete by a fully-integrated unit approach.

Source:

Methods

(protected) _getHorLengthPix(length) → {number}

Convert the given length from stimulus units to pixel units
Parameters:
Name Type Description
length number the length in stimulus units
Source:
Returns:
- the length in pixels
Type
number

(protected) _getLengthPix(length, integerCoordinatesopt) → {number}

Convert the given length from stimulus unit to pixel units.
Parameters:
Name Type Attributes Default Description
length number the length in stimulus units
integerCoordinates boolean <optional>
false whether or not to round the length.
Source:
Returns:
- the length in pixel units
Type
number

(protected) _getLengthUnits(length_px) → {number}

Convert the given length from pixel units to the stimulus units
Parameters:
Name Type Description
length_px number the length in pixel units
Source:
Returns:
- the length in stimulus units
Type
number

(protected) _getVerLengthPix(length) → {number}

Convert the given length from pixel units to the stimulus units
Parameters:
Name Type Description
length number the length in pixel units
Source:
Returns:
- the length in stimulus units
Type
number