<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
<link rel="self" type="application/atom+xml" href="http://theeyetribe.com/forum/feed.php?f=11&amp;t=507" />

<title>The Eye Tribe</title>
<subtitle>Developer Forum</subtitle>
<link href="http://theeyetribe.com/forum/index.php" />
<updated>2015-10-25T22:48:59+02:00</updated>

<author><name><![CDATA[The Eye Tribe]]></name></author>
<id>http://theeyetribe.com/forum/feed.php?f=11&amp;t=507</id>
<entry>
<author><name><![CDATA[albert]]></name></author>
<updated>2015-10-25T22:48:59+02:00</updated>
<published>2015-10-25T22:48:59+02:00</published>
<id>http://theeyetribe.com/forum/viewtopic.php?t=507&amp;p=2318#p2318</id>
<link href="http://theeyetribe.com/forum/viewtopic.php?t=507&amp;p=2318#p2318"/>
<title type="html"><![CDATA[Re: Strange x / y shift in WPF application.]]></title>

<content type="html" xml:base="http://theeyetribe.com/forum/viewtopic.php?t=507&amp;p=2318#p2318"><![CDATA[
Hi again<br /><br />This fix works great for Win 8/8.1 Store and Win10 Universal apps. However for WPF applications, this below worked for me:<br /><br /><dl class="codebox"><dt>Code: </dt><dd><code>var dpiXProperty = typeof(SystemParameters).GetProperty(&quot;DpiX&quot;, BindingFlags.NonPublic | BindingFlags.Static);<br />var dpiYProperty = typeof(SystemParameters).GetProperty(&quot;Dpi&quot;, BindingFlags.NonPublic | BindingFlags.Static);<br /><br />var dpiX = (int)dpiXProperty.GetValue(null, null);<br />var dpiY = (int)dpiYProperty.GetValue(null, null);<br /></code></dd></dl><p>Statistics: Posted by <a href="http://theeyetribe.com/forum/memberlist.php?mode=viewprofile&amp;u=8942">skataalbert</a> — 25 Oct 2015, 22:48</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[chithiravelus@yahoo.com]]></name></author>
<updated>2015-07-14T21:35:34+02:00</updated>
<published>2015-07-14T21:35:34+02:00</published>
<id>http://theeyetribe.com/forum/viewtopic.php?t=507&amp;p=2137#p2137</id>
<link href="http://theeyetribe.com/forum/viewtopic.php?t=507&amp;p=2137#p2137"/>
<title type="html"><![CDATA[Re: Strange x / y shift in WPF application.]]></title>

<content type="html" xml:base="http://theeyetribe.com/forum/viewtopic.php?t=507&amp;p=2137#p2137"><![CDATA[
Hi Friend, sorry to disturb you in between your query.<br /><br />I had downloaded the TET client master.  please tell me how to call TET client program into our application for eye click event. thank you<br /><br />share me the code please if you have done alreadyh<p>Statistics: Posted by <a href="http://theeyetribe.com/forum/memberlist.php?mode=viewprofile&amp;u=7258">skatachithiravelus@yahoo.com</a> — 14 Jul 2015, 21:35</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[lichter@bainet.com]]></name></author>
<updated>2015-07-07T16:09:06+02:00</updated>
<published>2015-07-07T16:09:06+02:00</published>
<id>http://theeyetribe.com/forum/viewtopic.php?t=507&amp;p=2119#p2119</id>
<link href="http://theeyetribe.com/forum/viewtopic.php?t=507&amp;p=2119#p2119"/>
<title type="html"><![CDATA[Re: Strange x / y shift in WPF application.]]></title>

<content type="html" xml:base="http://theeyetribe.com/forum/viewtopic.php?t=507&amp;p=2119#p2119"><![CDATA[
You probably need to convert to/from device-independent pixels (DIP).<br /><br /><dl class="codebox"><dt>Code: </dt><dd><code>    public partial class MyPage : IGazeListener<br />    {<br />        private readonly double _logicalDpi;<br />        private readonly double _rawDpi;<br /><br />        public MyPage()<br />        {<br />            InitializeComponent();<br /><br />            // Get pixel density information<br />            var display = DisplayInformation.GetForCurrentView();<br />            _logicalDpi = display.LogicalDpi;<br />            _rawDpi = display.RawDpiX;<br />            Debug.WriteLine(&quot;Logical DPI: &quot; + _logicalDpi);<br />            Debug.WriteLine(&quot;Raw DPI: &quot; + _rawDpi);<br />        }<br /><br />        public async void OnGazeUpdate(GazeData gazeData)<br />        {<br />            await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, delegate()<br />            {<br />                try<br />                {<br />                    // Calculate the gaze location in logical (display independent, layout) pixels<br />                    double logicalX = gazeData.SmoothedCoordinates.X * 96.0 / _logicalDpi;<br />                    double logicalY = gazeData.SmoothedCoordinates.Y * 96.0 / _logicalDpi;<br /><br />                    // Draw indicator at (logicalX, logicalY)<br />                    // ....<br />                }<br />                catch (Exception ex)<br />                {<br />                    Debug.WriteLine(ex.Message);<br />                    Debug.WriteLine(ex.StackTrace);<br />                }<br />            });<br />        }<br />    }<br /></code></dd></dl><p>Statistics: Posted by <a href="http://theeyetribe.com/forum/memberlist.php?mode=viewprofile&amp;u=7017">skatalichter@bainet.com</a> — 07 Jul 2015, 16:09</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[albert]]></name></author>
<updated>2015-07-07T14:26:39+02:00</updated>
<published>2015-07-07T14:26:39+02:00</published>
<id>http://theeyetribe.com/forum/viewtopic.php?t=507&amp;p=2118#p2118</id>
<link href="http://theeyetribe.com/forum/viewtopic.php?t=507&amp;p=2118#p2118"/>
<title type="html"><![CDATA[Strange x / y shift in WPF application.]]></title>

<content type="html" xml:base="http://theeyetribe.com/forum/viewtopic.php?t=507&amp;p=2118#p2118"><![CDATA[
I have strange x and y coordinates shift in the WPF application  (please see the screen shot: <a href="http://s8.postimg.org/l3etopwl1/Capture.jpg" class="postlink">http://s8.postimg.org/l3etopwl1/Capture.jpg</a>). <br />Small white ellipse (on the bottom right of the red square) is the gaze pointer that shows outputs from eye tracker while watching red square in the middle.<br /><br />The snippet below shows the way I’m setting position of the gaze pointer (following code runs in WPF application).<br /><dl class="codebox"><dt>Code: </dt><dd><code>var x = Screen.PrimaryScreen.Bounds.X; <br />var y = Screen.PrimaryScreen.Bounds.Y; <br />          <br />var screenX = (int)Math.Round(x + gazeData.SmoothedCoordinates.X, 0);<br />var screenY = (int)Math.Round(y + gazeData.SmoothedCoordinates.Y, 0);</code></dd></dl><br /> I’m using TheEyeTribeSDK-0.9.56-x86 with TETCSharpClient 0.9.56. I’m calibrating tracker via EyeTribe UI and then run the application.  It was tested on several persons with same results, tracker was in proper position calibrated with best rank. Does anyone have an idea what might causing it? Please assume that application’s surrounding doesn’t affect the output position of the gaze pointer.<br /><br />Thank you for your support!<p>Statistics: Posted by <a href="http://theeyetribe.com/forum/memberlist.php?mode=viewprofile&amp;u=8942">skataalbert</a> — 07 Jul 2015, 14:26</p><hr />
]]></content>
</entry>
</feed>