<?xml version="1.0" encoding="utf-8"?>
<feed version="0.3" xmlns="http://purl.org/atom/ns#">
<link rel="alternate" type="text/html" href="https://gamma.unpythonic.net/"/>

<title>Jeff Epler's blog</title>
<modified>2006-04-29T21:58:13Z</modified>
<tagline>Photos, electronics, cnc, and more</tagline>
<author><name>Jeff Epler</name><email>jepler@unpythonic.net</email></author>
<entry>
<title>Onscreen Crosshairs in tcl/tk</title>
<issued>2006-04-29T21:58:13Z</issued>
<modified>2006-04-29T21:58:13Z</modified>
<id>https://gamma.unpythonic.net/software/01146347893</id>
<link rel="alternate" type="text/html" href="https://gamma.unpythonic.net/software/01146347893"/>
<content type="text/html" mode="escaped">
I was staring too long at a screenshot of a graph on some web page, wishing I
could tell if two things lined up.  Well, inspiration struck, and this program
was born.  Two windows&amp;mdash;one that is one pixel wide, and another
that is one pixel tall&amp;mdash;are created, and they follow the mouse
around every 1/10 second or so.  They're displaced by one pixel so that clicking will hit the underlying window, not the crosshair.

&lt;p&gt;I apologize for the changing colors, since xor isn't available with this simple
method of drawing the lines, it's the only way to be sure to get contrast.  I considered making the color depend on e.g., whether SHIFT is pressed, but if Tk provides this information to a window that doesn't have focus, I overlooked it in the manpages.
</content>
</entry>
</feed>
