{"id":86,"date":"2013-09-12T22:47:00","date_gmt":"2013-09-12T21:47:00","guid":{"rendered":"http:\/\/www.celesteh.com\/blog\/2013\/09\/12\/drawing\/"},"modified":"2015-06-19T00:23:05","modified_gmt":"2015-06-18T23:23:05","slug":"drawing","status":"publish","type":"post","link":"https:\/\/www.celesteh.com\/blog\/2013\/09\/12\/drawing\/","title":{"rendered":"Drawing"},"content":{"rendered":"<p>Today I went to the dentist because my dental surgery from last week was still all swollen and that turns out to not be a good sign. So I picked up some antibiotics and then went to the Goldsmiths degree show, which was interesting and extremely variable. I did not get a lot of creative pacting done today. I read a wee bit about how to declare objects in javascript, which is really easy:<\/p>\n<pre>\nvar cleff = {\nunicode: \"&x#1d11e\";\nrepeats: 1\n};\n<\/pre>\n<p>What I really need is just a syntax cheat sheet, since I&#8217;m already familiar with most of the concepts of this language. So I skipped ahead to canvases.<\/p>\n<p>Your browser does not support the HTML5 canvas tag.<\/p>\n<p>var c=document.getElementById(&#8220;myCanvas&#8221;);<br \/>\nvar ctx=c.getContext(&#8220;2d&#8221;);<br \/>\nctx.fillStyle=&#8221;#FF0000&#8243;;<br \/>\nctx.fillRect(0,0,200,100);<br \/>\nctx.fillStyle=&#8221;#000000&#8243;;<br \/>\nctx.moveTo(0,0);<br \/>\nctx.lineTo(200,100);<br \/>\nctx.stroke();<br \/>\nctx.fillStyle=&#8221;#0000FF&#8221;;<br \/>\nctx.moveTo(0, 32);<br \/>\nctx.lineTo(200, 32);<br \/>\nctx.stroke();<br \/>\nctx.fillText(&#8220;unicode?&#8221;,32,32)<\/p>\n<p>What the source for that looks like is:<\/p>\n<pre>\n&lt;canvas id=\"myCanvas\" width=\"200\" height=\"100\" style=\"border:1px solid #d3d3d3;\"&gt;\nYour browser does not support the HTML5 canvas tag.&lt;\/canvas&gt;\n\n&lt;script&gt;\n\nvar c=document.getElementById(\"myCanvas\");\nvar ctx=c.getContext(\"2d\");\nctx.fillStyle=\"#FF0000\";\nctx.fillRect(0,0,200,100);\nctx.fillStyle=\"#000000\";\nctx.moveTo(0,0);\nctx.lineTo(200,100);\nctx.stroke();\nctx.fillStyle=\"#0000FF\";\nctx.moveTo(0, 32);\nctx.lineTo(200, 32);\nctx.stroke();\nctx.fillText(\"unicode?\",32,32)\n\n\n&lt;\/script&gt;\n\n<\/pre>\n<p>I need to learn how to get unicode into those strings. Just typing it in with the ctrl-shift-u thing doesn&#8217;t work, nor does typing the html escape sequence. Also, it seems like changing the line colour didn&#8217;t work.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today I went to the dentist because my dental surgery from last week was still all swollen and that turns out to not be a good sign. So I picked up some antibiotics and then went to the Goldsmiths degree show, which was interesting and extremely variable. I did not get a lot of creative &hellip; <a href=\"https:\/\/www.celesteh.com\/blog\/2013\/09\/12\/drawing\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Drawing<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[1],"tags":[42,77,78],"class_list":["post-86","post","type-post","status-publish","format-standard","hentry","category-uncategorised","tag-composing","tag-creative-pact","tag-javascript"],"_links":{"self":[{"href":"https:\/\/www.celesteh.com\/blog\/wp-json\/wp\/v2\/posts\/86","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.celesteh.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.celesteh.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.celesteh.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.celesteh.com\/blog\/wp-json\/wp\/v2\/comments?post=86"}],"version-history":[{"count":1,"href":"https:\/\/www.celesteh.com\/blog\/wp-json\/wp\/v2\/posts\/86\/revisions"}],"predecessor-version":[{"id":2278,"href":"https:\/\/www.celesteh.com\/blog\/wp-json\/wp\/v2\/posts\/86\/revisions\/2278"}],"wp:attachment":[{"href":"https:\/\/www.celesteh.com\/blog\/wp-json\/wp\/v2\/media?parent=86"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.celesteh.com\/blog\/wp-json\/wp\/v2\/categories?post=86"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.celesteh.com\/blog\/wp-json\/wp\/v2\/tags?post=86"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}