{"id":355,"date":"2007-10-24T07:01:59","date_gmt":"2007-10-24T12:01:59","guid":{"rendered":"http:\/\/www.juixe.com\/techknow\/index.php\/2007\/10\/24\/running-with-shoes-show-me-more\/"},"modified":"2007-10-24T07:01:59","modified_gmt":"2007-10-24T12:01:59","slug":"running-with-shoes-show-me-more","status":"publish","type":"post","link":"http:\/\/juixe.com\/techknow\/index.php\/2007\/10\/24\/running-with-shoes-show-me-more\/","title":{"rendered":"Running with Shoes &#8211; Show Me More"},"content":{"rendered":"<p>This tutorial describes some of the basic graphic capabilities of the <a href=\"http:\/\/www.juixe.com\/techknow\/index.php\/2007\/08\/27\/running-with-shoes-a-mini-gui\/\">Shoes<\/a> Ruby-based mini-GUI toolkit.<\/p>\n<p><b>Shoes Fade<\/b><br \/>\nHere is a good example of Shoes oval method in action.  For a lack of a better name I call this example Fade Into Black.  It is just a series of circles getting 25%.<\/p>\n<p><span class=\"frame-outer  \"><span><span><span><span><img src='http:\/\/www.juixe.com\/techknow\/wp-content\/uploads\/2007\/10\/fade.png' alt='Shoes Fade' \/><\/span><\/span><\/span><\/span><\/span><\/p>\n<p>Here is the source code for the above image.<\/p>\n<p>[source:ruby]<br \/>\nShoes.app :width => 600, :height => 600 do<br \/>\n  nostroke<br \/>\n  draw_circle(self, 0.9, 600)<br \/>\nend<\/p>\n<p>def draw_circle(app, color, size)<br \/>\n  r = size\/2<br \/>\n  app.fill gray(color)<br \/>\n  app.oval app.width\/2 &#8211; r, 0, size, size<br \/>\n  draw_circle(app, color &#8211; 0.04, 3*size\/4) if (color > 0.4)<br \/>\nend<br \/>\n[\/source]<\/p>\n<p><b>Shoes Worlds<\/b><br \/>\nTaking the above example one step further with using the mask method.<\/p>\n<p><span class=\"frame-outer  \"><span><span><span><span><img src='http:\/\/www.juixe.com\/techknow\/wp-content\/uploads\/2007\/10\/worlds.png' alt='Shoes Worlds' \/><\/span><\/span><\/span><\/span><\/span><\/p>\n<p>Here is the source code for the above image.<\/p>\n<p>[source:ruby]<br \/>\nShoes.app :width => 600, :height => 600 do<br \/>\n  nofill<br \/>\n  draw_circle(self, 0.1, 600)<br \/>\n  mask do<br \/>\n    250.times do<br \/>\n      x = (20..580).rand<br \/>\n      y = (20..580).rand<br \/>\n      s = (20..60).rand<br \/>\n      oval x, y, s, s<br \/>\n    end<br \/>\n  end<br \/>\nend<\/p>\n<p>def draw_circle(app, color, size)<br \/>\n  r = size\/2<br \/>\n  app.fill blue(color)<br \/>\n  app.oval app.width\/2 &#8211; r, app.height\/2 &#8211; r, size, size<br \/>\n  draw_circle(app, color + 0.04, 3*size\/4) if (color < 0.7)\nend\n[\/source]<p>Technorati Tags: <a href=\"http:\/\/technorati.com\/tag\/shoes\" rel=\"tag\">shoes<\/a>, <a href=\"http:\/\/technorati.com\/tag\/gui\" rel=\"tag\"> gui<\/a>, <a href=\"http:\/\/technorati.com\/tag\/tookit\" rel=\"tag\"> tookit<\/a>, <a href=\"http:\/\/technorati.com\/tag\/ruby\" rel=\"tag\"> ruby<\/a>, <a href=\"http:\/\/technorati.com\/tag\/ui\" rel=\"tag\"> ui<\/a>, <a href=\"http:\/\/technorati.com\/tag\/graphics\" rel=\"tag\"> graphics<\/a>, <a href=\"http:\/\/technorati.com\/tag\/gradient\" rel=\"tag\"> gradient<\/a>, <a href=\"http:\/\/technorati.com\/tag\/color\" rel=\"tag\"> color<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial describes some of the basic graphic capabilities of the Shoes Ruby-based mini-GUI toolkit. Shoes Fade Here is a good example of Shoes oval method in action. For a lack of a better name I call this example Fade Into Black. It is just a series of circles getting 25%. Here is the source [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","footnotes":""},"categories":[22,3],"tags":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p902K-5J","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/posts\/355"}],"collection":[{"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/comments?post=355"}],"version-history":[{"count":0,"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/posts\/355\/revisions"}],"wp:attachment":[{"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/media?parent=355"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/categories?post=355"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/tags?post=355"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}