<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Custom widgets with Cairo.</title>
	<atom:link href="http://blogs.gnome.org/brunobol/2008/03/09/custom-widgets-with-cairo/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.gnome.org/brunobol/2008/03/09/custom-widgets-with-cairo/</link>
	<description></description>
	<lastBuildDate>Sun, 28 Aug 2011 07:52:59 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Bruno Boaventura (brunobol) &#187; Blog Archive &#187; Yet about custom widgets with Cairo</title>
		<link>http://blogs.gnome.org/brunobol/2008/03/09/custom-widgets-with-cairo/comment-page-1/#comment-192</link>
		<dc:creator>Bruno Boaventura (brunobol) &#187; Blog Archive &#187; Yet about custom widgets with Cairo</dc:creator>
		<pubDate>Tue, 11 Mar 2008 00:24:28 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/brunobol/2008/03/09/custom-widgets-with-cairo/#comment-192</guid>
		<description>[...] Bruno Boaventura (brunobol)       &#171; Custom widgets with Cairo. [...]</description>
		<content:encoded><![CDATA[<p>[...] Bruno Boaventura (brunobol)       &laquo; Custom widgets with Cairo. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carlosg</title>
		<link>http://blogs.gnome.org/brunobol/2008/03/09/custom-widgets-with-cairo/comment-page-1/#comment-191</link>
		<dc:creator>carlosg</dc:creator>
		<pubDate>Mon, 10 Mar 2008 13:43:09 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/brunobol/2008/03/09/custom-widgets-with-cairo/#comment-191</guid>
		<description>another possibility for rounded shapes is checking that x^2 + y^2 &lt; 1</description>
		<content:encoded><![CDATA[<p>another possibility for rounded shapes is checking that x^2 + y^2 &lt; 1</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Karl Lattimer</title>
		<link>http://blogs.gnome.org/brunobol/2008/03/09/custom-widgets-with-cairo/comment-page-1/#comment-190</link>
		<dc:creator>Karl Lattimer</dc:creator>
		<pubDate>Mon, 10 Mar 2008 08:47:21 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/brunobol/2008/03/09/custom-widgets-with-cairo/#comment-190</guid>
		<description>Oops, I should have noticed, you only want the input shaped... /halfasleep</description>
		<content:encoded><![CDATA[<p>Oops, I should have noticed, you only want the input shaped&#8230; /halfasleep</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Karl Lattimer</title>
		<link>http://blogs.gnome.org/brunobol/2008/03/09/custom-widgets-with-cairo/comment-page-1/#comment-189</link>
		<dc:creator>Karl Lattimer</dc:creator>
		<pubDate>Mon, 10 Mar 2008 08:45:32 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/brunobol/2008/03/09/custom-widgets-with-cairo/#comment-189</guid>
		<description>Have you looked at the gsm_color_button.c/h code in gnome-system-monitor 

That does it :)</description>
		<content:encoded><![CDATA[<p>Have you looked at the gsm_color_button.c/h code in gnome-system-monitor </p>
<p>That does it <img src='http://blogs.gnome.org/brunobol/wp-content/mu-plugins/tango-smilies/tango/face-smile.png' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jonner</title>
		<link>http://blogs.gnome.org/brunobol/2008/03/09/custom-widgets-with-cairo/comment-page-1/#comment-188</link>
		<dc:creator>jonner</dc:creator>
		<pubDate>Mon, 10 Mar 2008 00:53:30 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/brunobol/2008/03/09/custom-widgets-with-cairo/#comment-188</guid>
		<description>alternately, use something like goocanvas.</description>
		<content:encoded><![CDATA[<p>alternately, use something like goocanvas.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Davyd</title>
		<link>http://blogs.gnome.org/brunobol/2008/03/09/custom-widgets-with-cairo/comment-page-1/#comment-187</link>
		<dc:creator>Davyd</dc:creator>
		<pubDate>Mon, 10 Mar 2008 00:20:07 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/brunobol/2008/03/09/custom-widgets-with-cairo/#comment-187</guid>
		<description>As people have said, you can easily calculate whether or not you&#039;re inside the area, either using Cairo or by doing your own geometry calculations. You could overload the vcall for the signal and eat the event in the case where you don&#039;t want to send it out (probably shouldn&#039;t do this).

Alternatively, if you were using GooCanvas, you could connect button-press-event directly to the clock object. It makes a lot of this stuff much simpler to do.</description>
		<content:encoded><![CDATA[<p>As people have said, you can easily calculate whether or not you&#8217;re inside the area, either using Cairo or by doing your own geometry calculations. You could overload the vcall for the signal and eat the event in the case where you don&#8217;t want to send it out (probably shouldn&#8217;t do this).</p>
<p>Alternatively, if you were using GooCanvas, you could connect button-press-event directly to the clock object. It makes a lot of this stuff much simpler to do.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: greg</title>
		<link>http://blogs.gnome.org/brunobol/2008/03/09/custom-widgets-with-cairo/comment-page-1/#comment-186</link>
		<dc:creator>greg</dc:creator>
		<pubDate>Sun, 09 Mar 2008 23:29:12 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/brunobol/2008/03/09/custom-widgets-with-cairo/#comment-186</guid>
		<description>On receiving a click event create a dummy surface, draw the clock, then use cairo_in_fill for hit testing.</description>
		<content:encoded><![CDATA[<p>On receiving a click event create a dummy surface, draw the clock, then use cairo_in_fill for hit testing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: otte</title>
		<link>http://blogs.gnome.org/brunobol/2008/03/09/custom-widgets-with-cairo/comment-page-1/#comment-185</link>
		<dc:creator>otte</dc:creator>
		<pubDate>Sun, 09 Mar 2008 23:27:13 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/brunobol/2008/03/09/custom-widgets-with-cairo/#comment-185</guid>
		<description>You can use cairo_in_fill() to check if you&#039;re in a given path you constructed in cairo or cairo_in_stroke() for strokes. And then you have to check that for every mouse move. It&#039;s how I do it in Swfdec.

So it is possible, but it&#039;s not a drop-in one-line function that does that for you.</description>
		<content:encoded><![CDATA[<p>You can use cairo_in_fill() to check if you&#8217;re in a given path you constructed in cairo or cairo_in_stroke() for strokes. And then you have to check that for every mouse move. It&#8217;s how I do it in Swfdec.</p>
<p>So it is possible, but it&#8217;s not a drop-in one-line function that does that for you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: writser</title>
		<link>http://blogs.gnome.org/brunobol/2008/03/09/custom-widgets-with-cairo/comment-page-1/#comment-181</link>
		<dc:creator>writser</dc:creator>
		<pubDate>Sun, 09 Mar 2008 23:14:53 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/brunobol/2008/03/09/custom-widgets-with-cairo/#comment-181</guid>
		<description>see:

http://library.gnome.org/devel/gdk/stable/gdk-Windows.html#gdk-window-input-shape-combine-mask

I don&#039;t know whether it already works on windows. You could also manually construct a bitmask (you can use almost the same cairo code) and check whether the input falls in the mask manually.</description>
		<content:encoded><![CDATA[<p>see:</p>
<p><a href="http://library.gnome.org/devel/gdk/stable/gdk-Windows.html#gdk-window-input-shape-combine-mask" rel="nofollow">http://library.gnome.org/devel/gdk/stable/gdk-Windows.html#gdk-window-input-shape-combine-mask</a></p>
<p>I don&#8217;t know whether it already works on windows. You could also manually construct a bitmask (you can use almost the same cairo code) and check whether the input falls in the mask manually.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: desrt</title>
		<link>http://blogs.gnome.org/brunobol/2008/03/09/custom-widgets-with-cairo/comment-page-1/#comment-180</link>
		<dc:creator>desrt</dc:creator>
		<pubDate>Sun, 09 Mar 2008 22:39:30 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/brunobol/2008/03/09/custom-widgets-with-cairo/#comment-180</guid>
		<description>you can&#039;t have X only give you events for this area without using a separate window and xshape.  this is not what you want to do.

what you want to do, instead, is capture all events but then use cairo_in_fill or cairo_in_stroke to check if the point that was clicked on is within the area that you&#039;re interested in.</description>
		<content:encoded><![CDATA[<p>you can&#8217;t have X only give you events for this area without using a separate window and xshape.  this is not what you want to do.</p>
<p>what you want to do, instead, is capture all events but then use cairo_in_fill or cairo_in_stroke to check if the point that was clicked on is within the area that you&#8217;re interested in.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!-- This Quick Cache file was built for (  blogs.gnome.org/brunobol/2008/03/09/custom-widgets-with-cairo/feed/ ) in 1.17121 seconds, on Feb 12th, 2012 at 4:33 am UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Feb 12th, 2012 at 5:33 am UTC -->
