WindowMixin

core. WindowMixin

Source:

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.

Methods

(protected) _getHorLengthPix(length) → {number}

Source:

Convert the given length from stimulus units to pixel units

Parameters:
Name Type Description
length number

the length in stimulus units

Returns:
  • the length in pixels
Type
number

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

Source:

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.

Returns:
  • the length in pixel units
Type
number

(protected) _getLengthUnits(length_px) → {number}

Source:

Convert the given length from pixel units to the stimulus units

Parameters:
Name Type Description
length_px number

the length in pixel units

Returns:
  • the length in stimulus units
Type
number

(protected) _getVerLengthPix(length) → {number}

Source:

Convert the given length from pixel units to the stimulus units

Parameters:
Name Type Description
length number

the length in pixel units

Returns:
  • the length in stimulus units
Type
number