{"id":2153,"date":"2009-03-15T17:58:43","date_gmt":"2009-03-15T21:58:43","guid":{"rendered":"http:\/\/www.hoogervorst.ca\/arthur\/?p=2153"},"modified":"2009-03-18T19:56:53","modified_gmt":"2009-03-18T23:56:53","slug":"a-circular-thing","status":"publish","type":"post","link":"http:\/\/www.hoogervorst.ca\/arthur\/?p=2153","title":{"rendered":"A circular thing"},"content":{"rendered":"<p><span class=\"dropcap\">I<\/span>&#8216;m extremely<a href=\"http:\/\/www.hoogervorst.ca\/arthur\/?attachment_id=2152\" rel=\"attachment wp-att-2152\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.hoogervorst.ca\/arthur\/wp-content\/uploads\/2009\/03\/acontrol-150x111.png\" alt=\"A some control\" title=\"A some control\" width=\"150\" height=\"111\" class=\"alignright size-thumbnail wp-image-2152\" srcset=\"http:\/\/www.hoogervorst.ca\/arthur\/wp-content\/uploads\/2009\/03\/acontrol-150x111.png 150w, http:\/\/www.hoogervorst.ca\/arthur\/wp-content\/uploads\/2009\/03\/acontrol.png 235w\" sizes=\"(max-width: 150px) 100vw, 150px\" \/><\/a> impressed with the Google Chrome download indicator: for some kind of reason, a circular progress meter makes a lot more sense than a linear one. Maybe it&#8217;s because of Pi.\n<\/p>\n<p>Since I was so impressed and because it was &#8216;Pi day&#8217; the other day (<a href=\"http:\/\/www.piday.org\/\">Pi Day<\/a>), I thought now was a good time to write a component that does just that: show the progress of something in a somewhat circular form. You can find the code right <a href='http:\/\/www.hoogervorst.ca\/arthur\/?attachment_id=2154' rel='attachment wp-att-2154'>here<\/a>: a reminder, it&#8217;s C# and that means it is meant for .Net. I&#8217;d be really surprised if it wouldn&#8217;t work on Mono (it should) [just tested and confirmed that it works].\n<\/p>\n<p>A couple of notes:<\/p>\n<ul>\n<li>FillColor is the colour that&#8217;s used to fill up the circle<\/li>\n<li>ForeColor is used for the Text (progress text)<\/li>\n<\/ul>\n<p>The code should be pretty clear in what it does: I was planning to also paint a bunch of &#8220;spokes&#8221; in the meter but couldn&#8217;t be bothered at the end<sup>1<\/sup>. It shouldn&#8217;t be too hard (use the sin\/cos methods of the Math class to get the right x\/y coordinates).\n<\/p>\n<div class=\"reference\">\n<p><sup>1<\/sup> Also, this would have given it the Trivial Pursuit look: Google&#8217;s progress meter reminds me of that too.<\/p>\n<p><strong>03\/16\/09:<\/strong> Introduced drawing of Text\/Label\/Caption.\n<\/p>\n<p><strong>03\/18\/09:<\/strong> Good rewrite: Mostly introduction of &#8216;progressbar&#8217; like properties and methods (Value, Min\/MaxValue), Marquee. Introduction of a ProgressType enumeration (maybe should use the regular ProgressbarType). Also, same license (Commercial\/personal free use, but please leave the credits in).\n<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>I&#8216;m extremely impressed with the Google Chrome download indicator: for some kind of reason, a circular progress meter makes a lot more sense than a linear one. Maybe it&#8217;s because of Pi. Since I was so impressed and because it &hellip; <a href=\"http:\/\/www.hoogervorst.ca\/arthur\/?p=2153\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[4],"tags":[56,88,176],"_links":{"self":[{"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=\/wp\/v2\/posts\/2153"}],"collection":[{"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2153"}],"version-history":[{"count":1,"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=\/wp\/v2\/posts\/2153\/revisions"}],"predecessor-version":[{"id":2155,"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=\/wp\/v2\/posts\/2153\/revisions\/2155"}],"wp:attachment":[{"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2153"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2153"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2153"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}