Home › Forums › Software Development › Tobii 4C – Electron integration with core SDK and Tobii Interaction 0.7.3 › Reply To: Tobii 4C – Electron integration with core SDK and Tobii Interaction 0.7.3
Hi @rockyhub, thanks for your query. The coordinates of the Gaze Point data stream and the Fixation data stream are provided in (x,y) points in pixels on the Virtual Screen. This is how the Virtual Screen is described on MSDN: https://msdn.microsoft.com/en-us/library/dd145136(v=vs.85).aspx
Are you using some other stream modifier to receive the values in mm?
In any case, since (0,0) is the upper left corner of the primary screen, whenever you look to the left or above the primary screen’s borders you will get negative values for the x and/or y coordinate in these EyeX data streams.
Accordingly, to convert the gaze values to pixels it should be sufficient to multiply the normalised (0,1) gaze co-ordinates by the pixel length of the screen which you can access via a regular .NET library.
Display display = getWindowManager().getDefaultDisplay(); Point size = new Point(); display.getSize(size); int width = size.x; int height = size.y;
Hopefully, this answers your query, but please let us know if we can be of any further assistance.