<?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: Drawing a round rect with Quartz</title>
	<atom:link href="http://www.dpompa.com/blog/code/drawing-a-round-rect-with-quartz/feed" rel="self" type="application/rss+xml" />
	<link>http://www.dpompa.com/blog/code/drawing-a-round-rect-with-quartz</link>
	<description>dPompa Blog</description>
	<lastBuildDate>Sat, 22 May 2010 04:48:49 +0200</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: boogleTron</title>
		<link>http://www.dpompa.com/blog/code/drawing-a-round-rect-with-quartz/comment-page-1#comment-8</link>
		<dc:creator>boogleTron</dc:creator>
		<pubDate>Wed, 09 Dec 2009 00:26:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.dpompa.com/blog/?p=22#comment-8</guid>
		<description>It seems like you forgot to update the posted code after fixing the bug you mentioned. Here&#039;s my correction:
void DPContextAddRoundRect(CGContextRef context, CGRect rect, CGFloat cornerRad) {
	// Top Left
	CGContextMoveToPoint(context, rect.origin.x, cornerRad+rect.origin.y);
	CGContextAddArcToPoint(context,
                               rect.origin.x,
                               rect.origin.y,
                               rect.origin.x + cornerRad,
                               rect.origin.y,
                               cornerRad);
	// Top right
	CGContextAddArcToPoint(context,
                               rect.origin.x + rect.size.width,
                               rect.origin.y,
                               rect.origin.x + rect.size.width,
                               rect.origin.y + cornerRad,
                               cornerRad);</description>
		<content:encoded><![CDATA[<p>It seems like you forgot to update the posted code after fixing the bug you mentioned. Here&#8217;s my correction:<br />
void DPContextAddRoundRect(CGContextRef context, CGRect rect, CGFloat cornerRad) {<br />
	// Top Left<br />
	CGContextMoveToPoint(context, rect.origin.x, cornerRad+rect.origin.y);<br />
	CGContextAddArcToPoint(context,<br />
                               rect.origin.x,<br />
                               rect.origin.y,<br />
                               rect.origin.x + cornerRad,<br />
                               rect.origin.y,<br />
                               cornerRad);<br />
	// Top right<br />
	CGContextAddArcToPoint(context,<br />
                               rect.origin.x + rect.size.width,<br />
                               rect.origin.y,<br />
                               rect.origin.x + rect.size.width,<br />
                               rect.origin.y + cornerRad,<br />
                               cornerRad);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: boogleTron</title>
		<link>http://www.dpompa.com/blog/code/drawing-a-round-rect-with-quartz/comment-page-1#comment-7</link>
		<dc:creator>boogleTron</dc:creator>
		<pubDate>Tue, 08 Dec 2009 23:41:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.dpompa.com/blog/?p=22#comment-7</guid>
		<description>Thanks for the hint! I&#039;m a quartz drawing noob and the thing that I had to figure out on my own was that I needed to bracket the call to your function like so:

CGContextBeginPath(context);

DPContextAddRoundRect(context, rect, radius);

CGContextDrawPath(context, kCGPathStroke);</description>
		<content:encoded><![CDATA[<p>Thanks for the hint! I&#8217;m a quartz drawing noob and the thing that I had to figure out on my own was that I needed to bracket the call to your function like so:</p>
<p>CGContextBeginPath(context);</p>
<p>DPContextAddRoundRect(context, rect, radius);</p>
<p>CGContextDrawPath(context, kCGPathStroke);</p>
]]></content:encoded>
	</item>
</channel>
</rss>
