{"id":30437,"date":"2017-05-24T03:01:56","date_gmt":"2017-05-23T17:01:56","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=30437"},"modified":"2017-05-23T13:41:59","modified_gmt":"2017-05-23T03:41:59","slug":"signature-signature-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/signature-signature-primer-tutorial\/","title":{"rendered":"Signature Signature Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/signature_signature.html\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"Signature Signature Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/signature_signature.jpg\" title=\"Signature Signature Primer Tutorial\"  \/><\/a><p class=\"wp-caption-text\">Signature Signature Primer Tutorial<\/p><\/div>\n<p>Today&#8217;s new web application is a Signature Signature.  Our aim with this web application is &#8230;<\/p>\n<ul>\n<li>capture a person&#8217;s signature (via an HTML(5) <a target=_blank href='https:\/\/www.w3schools.com\/html\/html5_canvas.asp' title='HTML(5) canvas element information from w3schools'>Canvas<\/a> element) &#8230; and be &#8230;<\/li>\n<li>collecting that Signature&#8217;s &#8220;Signature&#8221; in terms of a pen plotter pen up\/pen down instructional &#8220;definition&#8221; (in some way shape or form) &#8230; if the user is satisfied to &#8230;<\/li>\n<li>save the Signature&#8217;s &#8220;Signature&#8221; in a HTTP Cookie that can be remembered by this and other web applications, perhaps &#8230; we&#8217;ll see on this one<\/li>\n<\/ul>\n<p>If you&#8217;re a programmer reading above, am sure you are immediately curious about &#8230;<\/li>\n<ul>\n<li>cross-platform and cross-browser issues within the touch\/mouse worlds &#8230; you are not alone &#8230;<\/li>\n<li>can a complicated signature be saved within the storage restrictions of HTTP Cookies? &#8230; the room is getting more crowded &#8230;<\/li>\n<li>cropping and initial canvas size concepts &#8230; take a ticket &#8230;<\/li>\n<li>how do you handle scaling and the implications to authenticity (of scaling) if you reuse this Signature&#8217;s &#8220;Signature&#8221; in another context &#8230; think there&#8217;s room there squeezed up against the fridge<\/li>\n<li>astronauts in zero gravity? &#8230; alright already!<\/li>\n<\/ul>\n<p> &#8230; but, nevertheless, let&#8217;s just creep up on the project, and see how we go, here, today, on a first draft.<\/p>\n<p>Concentrating in on the HTML(5) Canvas element thoughts, what events will be of interest?<\/p>\n<ul>\n<li>mouse move event &#8220;onmousemove&#8221; (and its equivalent touch event(s)) &#8230; for sure, and others, perhaps like &#8230;<\/li>\n<li>mouse up &#8220;onmouseup&#8221; (like pen up) (and its equivalent touch event(s))<\/li>\n<li>mouse down &#8220;onmousedown&#8221; (like pen down) (and its equivalent touch event(s))<\/li>\n<\/ul>\n<p>This &#8220;events&#8221; concern we have, above, had a similar scenario to when we presented <a target=_blank href='https:\/\/www.rjmprogramming.com.au\/ITblog\/canvas-email-attachment-scribble-tutorial\/' title='Canvas Email Attachment Scribble Tutorial'>Canvas Email Attachment Scribble Tutorial<\/a>, and so, with that in mind, we are going to have a web application that &#8230;<\/li>\n<ol>\n<li>has a supervisory HTML and Javascript <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/signature_signature.html_GETME\" title=\"signature_signature.html\">signature_signature.html<\/a> &#8230; calling on &#8230;<\/li>\n<li>external Javascript has a supervisory HTML and Javascript <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/signature_signature.js_GETME\" title=\"signature_signature.js\">signature_signature.js<\/a> containing the Canvas element mouse\/touch event logics<\/li>\n<\/ol>\n<p>Here is a <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/signature_signature.html\" title=\"Click picture\">live run<\/a> link, and to see this in action, take a skeg at &#8230;<\/p>\n<p><iframe loading=\"lazy\" width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/uiM6x4TGGyg\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d30437' onclick='var dv=document.getElementById(\"d30437\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/canvas\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d30437' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Today&#8217;s new web application is a Signature Signature. Our aim with this web application is &#8230; capture a person&#8217;s signature (via an HTML(5) Canvas element) &#8230; and be &#8230; collecting that Signature&#8217;s &#8220;Signature&#8221; in terms of a pen plotter pen &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/signature-signature-primer-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,14,37],"tags":[184,265,380,400,576,578,652,738,812,1919,2219,997,1294,1319],"class_list":["post-30437","post","type-post","status-publish","format-standard","hentry","category-elearning","category-event-driven-programming","category-tutorials","tag-canvas","tag-copy","tag-email","tag-event","tag-html","tag-html5","tag-javascript","tag-mail","tag-mouse","tag-onmousedown","tag-onmousemove","tag-programming","tag-touch","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/30437"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=30437"}],"version-history":[{"count":4,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/30437\/revisions"}],"predecessor-version":[{"id":30441,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/30437\/revisions\/30441"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=30437"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=30437"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=30437"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}