<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>cat brain.log &#124; less &#187; bug</title>
	<atom:link href="http://log.largevoid.com/tag/bug/feed/" rel="self" type="application/rss+xml" />
	<link>http://log.largevoid.com</link>
	<description>Getting it down on `paper`</description>
	<lastBuildDate>Mon, 06 Feb 2012 06:23:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Google Earth Icons with Heading</title>
		<link>http://log.largevoid.com/2010/01/google-earth-icons-with-heading/</link>
		<comments>http://log.largevoid.com/2010/01/google-earth-icons-with-heading/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 23:14:52 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Lessons]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[google earth]]></category>
		<category><![CDATA[heading]]></category>
		<category><![CDATA[icons]]></category>
		<category><![CDATA[mapping]]></category>
		<category><![CDATA[wind barb]]></category>

		<guid isPermaLink="false">http://log.largevoid.com/?p=278</guid>
		<description><![CDATA[I&#8217;ve discovered that icons given headings in Google Earth KML stopped orienting in the specified heading direction. The result is that when a user rotates the Earth so that true North is not directly &#8220;up&#8221; on the screen, the angle of the icon is misleading. For wind barbs, this could lead to dangerous decisions being [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve discovered that icons given headings in Google Earth KML stopped orienting in the specified <em>heading</em> direction.  The result is that when a user rotates the Earth so that true North is not directly &#8220;up&#8221; on the screen, the angle of the icon is misleading.  For wind barbs, this could lead to dangerous decisions being made if the viewport isn&#8217;t manually corrected to set up = true north.</p>
<p>There are several known branches of this problem.</p>
<p><strong>One involves the Google Earth browser plug-in:</strong></p>
<p>Apparently, this incorrect handling is the end result of a bug fix to &#8220;correct&#8221; icon heading behavior.<br />
<q>Google Earth Plug-in &#8211; 5.1.3506.3999</q></p>
<p><q>(Issue 131) Icon headings should now behave as expected, and consistent with the Google Earth desktop client.</q> <cite><a href="http://www.noeman.org/gsm/mac-other-oses-softwares/106515-google-earth-google-earth-plug.html">http://www.noeman.org/gsm/mac-other-oses-softwares/106515-google-earth-google-earth-plug.html</a></cite></p>
<p>More on this bug (affecting version 5.1.x): http://www.google.com/support/forum/p/earth/thread?tid=005bea9c26949e40&amp;hl=en</p>
<p>Work-arounds: GroundOverlay and use a Colada model, both ugly.</p>
<p><strong>Another instance of the icon heading bug:</strong><br />
There is another situation in which the heading of the icon is not obeyed.  This occurs when an invalid styleUrl is used in the KML.  One recommendation is to remove the &#8220;#&#8221; character.  ex: &lt;styleUrl&gt;#balloonStyle&lt;/styleUrl&gt; is no longer correct as of version 5x.  I have not confirmed this, but I&#8217;ve heard that this is correctly implemented as &lt;styleUrl&gt;balloonStyle&lt;/styleUrl&gt;.  What happend?  This isn&#8217;t very backwards-compatible nor user-friendly.  Why the change?  HTML hashes are logically sound, as they refer to a locally named entity, such as those specified by a style id.</p>
<p>What worked for me was to completely remove the styleUrl when providing a local Style.  See below.</p>
<p><strong>Broken:</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;kml</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://www.opengis.net/kml/2.2&quot;</span> <span style="color: #000066;">xmlns:gx</span>=<span style="color: #ff0000;">&quot;http://www.google.com/kml/ext/2.2&quot;</span> <span style="color: #000066;">xmlns:kml</span>=<span style="color: #ff0000;">&quot;http://www.opengis.net/kml/2.2&quot;</span> <span style="color: #000066;">xmlns:atom</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/2005/Atom&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Document<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
 <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Weather Stations<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
 <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><span style="color: #339933;">&lt;![CDATA[&lt;p&gt;Generated: 2010-01-19 22:03:45 UTC&lt;/p&gt; &lt;p&gt;Only stations reporting &lt;b&gt;within 3 hours&lt;/b&gt; are included in this document.&lt;/p&gt;]]&gt;</span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
 <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;open<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/open<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
 <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Style<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ListStyle<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;listItemType<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>radioFolder<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/listItemType<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;bgColor<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>00ffffff<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/bgColor<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;maxSnippetLines<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>2<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/maxSnippetLines<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ListStyle<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
 <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Style<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
 <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Style</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;balloonStyle&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;BalloonStyle<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;text<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><span style="color: #339933;">&lt;![CDATA[</span>
<span style="color: #339933;">   &lt;h2 style=&quot;font-size:1.1em;border-bottom:solid #333 1px;&quot;&gt;Instrument:</span>
<span style="color: #339933;">   $[name]&lt;/h2&gt;</span>
<span style="color: #339933;">   $[description]</span>
<span style="color: #339933;">   ]]&gt;</span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/text<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/BalloonStyle<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
 <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Style<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
 <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Folder<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Visibility and Avg Winds<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Style<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ListStyle<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;listItemType<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>checkHideChildren<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/listItemType<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;bgColor<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>00ffffff<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/bgColor<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;maxSnippetLines<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>2<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/maxSnippetLines<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ListStyle<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
 <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Style<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
 <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;visibility<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>0<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/visibility<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
 <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Placemark<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Any Instrument ID<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><span style="color: #339933;">&lt;![CDATA[ &lt;p&gt;&lt;font color=&quot;#999&quot;&gt;Sample Date&lt;/font&gt;&lt;/p&gt; &lt;div&gt;Data Table Here&lt;/div&gt;]]&gt;</span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;styleUrl<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>#balloonStyle<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/styleUrl<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Style<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;IconStyle<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;scale<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>3.25<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/scale<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;heading<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>0<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/heading<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Icon<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
     <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;href<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>http://www.example.com/barb.php?spd=4<span style="color: #ddbb00;">&amp;amp;</span>dir=74<span style="color: #ddbb00;">&amp;amp;</span>val=7<span style="color: #ddbb00;">&amp;amp;</span>col=65280<span style="color: #ddbb00;">&amp;amp;</span>dia=100<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/href<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Icon<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/IconStyle<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Style<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Point<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;coordinates<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>-117.1135,32.3325,0<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/coordinates<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Point<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
 <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Placemark<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
 <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Folder<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Document<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/kml<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p><strong>Working:</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"> <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Placemark<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Any Instrument ID<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><span style="color: #339933;">&lt;![CDATA[ &lt;p&gt;&lt;font color=&quot;#999&quot;&gt;Sample Date&lt;/font&gt;&lt;/p&gt; &lt;div&gt;Data Table Here&lt;/div&gt;]]&gt;</span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Style<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;IconStyle<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;scale<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>3.25<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/scale<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;heading<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>0<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/heading<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Icon<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
     <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;href<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>http://www.example.com/barb.php?spd=4<span style="color: #ddbb00;">&amp;amp;</span>dir=74<span style="color: #ddbb00;">&amp;amp;</span>val=7<span style="color: #ddbb00;">&amp;amp;</span>col=65280<span style="color: #ddbb00;">&amp;amp;</span>dia=100<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/href<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Icon<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/IconStyle<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Style<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Point<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;coordinates<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>-117.1135,32.3325,0<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/coordinates<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Point<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
 <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Placemark<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://log.largevoid.com/2010/01/google-earth-icons-with-heading/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP/GD Bug: imageFilledEllipse Centered on Y=0</title>
		<link>http://log.largevoid.com/2009/11/phpgd-bug-imagefilledellipse-centered-on-y0/</link>
		<comments>http://log.largevoid.com/2009/11/phpgd-bug-imagefilledellipse-centered-on-y0/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 23:04:43 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Scripts, Tricks and Hacks]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[gd]]></category>
		<category><![CDATA[imageFilledEllipse]]></category>
		<category><![CDATA[imageFilledRectangle]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://log.largevoid.com/?p=145</guid>
		<description><![CDATA[I was drawing circles using PHP&#8217;s GD function imageFilledEllipse. I noticed that when I went to draw a circle having its center at $y=0,there would be a line missing at $y=1. Here&#8217;s the work-around: if&#40; -1 &#60;= $py &#38;&#38; $py &#60;= 1 &#41; &#123; // Undocumented PHP bug when Y coordinate is zero. imageFilledEllipse&#40;$img,$px,$py,$X,$X,$color&#41;; imageFilledRectangle&#40;$img,$px-$halfX,$py-1,$px+$halfX,$py+1,$color&#41;; [...]]]></description>
			<content:encoded><![CDATA[<p>I was drawing circles using PHP&#8217;s GD function <a href="http://us3.php.net/manual/en/function.imagefilledellipse.php"><em>imageFilledEllipse</em></a>.  I noticed that when I went to draw a circle having its center at $y=0,there would be a line missing at $y=1.</p>
<p>Here&#8217;s the work-around:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span> <span style="color: #339933;">&lt;=</span> <span style="color: #000088;">$py</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$py</span> <span style="color: #339933;">&lt;=</span> <span style="color: #cc66cc;">1</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #666666; font-style: italic;">// Undocumented PHP bug when Y coordinate is zero.</span>
  <span style="color: #990000;">imageFilledEllipse</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$img</span><span style="color: #339933;">,</span><span style="color: #000088;">$px</span><span style="color: #339933;">,</span><span style="color: #000088;">$py</span><span style="color: #339933;">,</span><span style="color: #000088;">$X</span><span style="color: #339933;">,</span><span style="color: #000088;">$X</span><span style="color: #339933;">,</span><span style="color: #000088;">$color</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #990000;">imageFilledRectangle</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$img</span><span style="color: #339933;">,</span><span style="color: #000088;">$px</span><span style="color: #339933;">-</span><span style="color: #000088;">$halfX</span><span style="color: #339933;">,</span><span style="color: #000088;">$py</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span><span style="color: #000088;">$px</span><span style="color: #339933;">+</span><span style="color: #000088;">$halfX</span><span style="color: #339933;">,</span><span style="color: #000088;">$py</span><span style="color: #339933;">+</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span><span style="color: #000088;">$color</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #990000;">imageFilledEllipse</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$img</span><span style="color: #339933;">,</span><span style="color: #000088;">$px</span><span style="color: #339933;">,</span><span style="color: #000088;">$py</span><span style="color: #339933;">,</span><span style="color: #000088;">$X</span><span style="color: #339933;">,</span><span style="color: #000088;">$X</span><span style="color: #339933;">,</span><span style="color: #000088;">$color</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>PHP Version:</p>
<pre>PHP 4.3.9 (cgi) (built: Apr  1 2009 10:41:42)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies</pre>
<p><code>$ yum search php-gd</code></p>
<pre>
php-gd.i386                              4.3.9-3.26             installed
Matched from:
php-gd
The php-gd package contains a dynamic shared object that will add
support for using the gd graphics library to PHP.
</pre>
]]></content:encoded>
			<wfw:commentRss>http://log.largevoid.com/2009/11/phpgd-bug-imagefilledellipse-centered-on-y0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- This Quick Cache file was built for (  log.largevoid.com/tag/bug/feed/ ) in 0.38612 seconds, on Feb 8th, 2012 at 3:38 am UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Feb 8th, 2012 at 4:38 am UTC -->
