{"id":31907,"date":"2017-08-23T03:01:30","date_gmt":"2017-08-22T17:01:30","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=31907"},"modified":"2017-08-02T14:10:56","modified_gmt":"2017-08-02T04:10:56","slug":"css-blend-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/css-blend-primer-tutorial\/","title":{"rendered":"CSS Blend Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Canvas\/VennDiagram\/\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"CSS Blend Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/blend_it.jpg\" title=\"CSS Blend Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">CSS Blend Primer Tutorial<\/p><\/div>\n<p>We read a <a target=_blank title='Great website' href='https:\/\/css-tricks.com\/basics-css-blend-modes\/'>great website<\/a>, thanks, the other day, talking about CSS (multiple background, and other) &#8220;blending&#8221;, basically concerning behaviours that happen when two colours &#8220;overlap&#8221; in a webpage.  This webpage talked about this in terms of your predictable HTML element types, and also with the canvas element introduced with HTML5, and for which we couldn&#8217;t be more keen, if we tried <font size=1>&#8230; and we&#8217;ve been told how trying we are &#8230; boom, boom!<\/font><\/p>\n<p>In this context, regarding canvas elements, we&#8217;d <b>never used<\/b> &#8230;<\/p>\n<p><code cite='https:\/\/css-tricks.com\/basics-css-blend-modes\/'><br \/>\nvar canvas = document.getElementById('canvas');<br \/>\nvar ctx = canvas.getContext('2d');<br \/>\n<b>ctx.globalCompositeOperation = 'multiply';<\/b><br \/>\n<\/code><\/p>\n<p>Wow! <font size=1>Nala said.<\/font> Bow! <font size=1>I replied.<\/font> &#8230; <font size=1>Down, girl!  Besides, shouldn&#8217;t you be curtsying?!<\/font><\/p>\n<p>And in that webpage, guess what caught my eye (sorry, Nala sees in black and white) was the Venn Diagram, and so, thought we&#8217;d try this technique on our own Venn Diagram application, that uses a canvas element, last talked about at <a title='HTML\/Javascript\/PHP Canvas Venn Diagram Import Tutorial' href='#html\/j\/phpcvdit'>HTML\/Javascript\/PHP Canvas Venn Diagram Import Tutorial<\/a> as shown below.  It&#8217;s a subtle change that you can see play out with <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Canvas\/VennDiagram\/venn_diagram.html---GETME\">venn_diagram.html<\/a> (changed <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Canvas\/VennDiagram\/venn_diagram.html---GETME\">this way<\/a>), but we&#8217;re pleased that this functionality is &#8220;out there&#8221;, and hope ideas spring eternal from your cranium regarding ideas here.  You can see this subtlety in play at the top and left parts of today&#8217;s <a target=_blank title='Tutorial picture' href='http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/blend_it.jpg'>tutorial picture<\/a>.<\/p>\n<p>So what&#8217;s with the mountains web application at the bottom right?  Well, do you remember <a target=_blank title='HTML\/CSS\/Javascript Sliding Menus Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/htmlcssjavascript-sliding-menus-primer-tutorial\/'>HTML\/CSS\/Javascript Sliding Menus Primer Tutorial<\/a>?  It had an <i>h1<\/i> heading.  Well, we replace that <i>h1<\/i> (by blanking its <i>innerHTML<\/i> property using Javascript DOM) and put in another, mainly <b>adding<\/b> new CSS as per<\/p>\n<p><code><br \/>\n<b>@import url(https:\/\/fonts.googleapis.com\/css?family=Alegreya+Sans+SC:900);<br \/>\n<\/b><br \/>\nbody {<br \/>\n   background-color: #cdcdcd;<br \/>\n   color: red;<br \/>\n   text-align:center;<br \/>\n   height: 600px;<br \/>\n<b><br \/>\n   padding: 20;<\/b><br \/>\n}<br \/>\n<b><br \/>\nheader {<br \/>\n  padding: 120px 50px 170px;<br \/>\n  background-size: cover;<br \/>\n}<br \/>\nheader h1 {<br \/>\n  position: absolute;<br \/>\n  top:10px;<br \/>\n  left:0px;<br \/>\n  z-index: -6;<br \/>\n  font-family: 'Alegreya Sans SC', sans-serif;<br \/>\n  font-size: 40px;<br \/>\n  color: red;<br \/>\n  opacity: 1.0;<br \/>\n  <i>mix-blend-mode: screen;<\/i><br \/>\n  padding: 0;<br \/>\n  margin: 0;<br \/>\n  width:100%;<br \/>\n  text-align:center;<br \/>\n  line-height: 0.5;<br \/>\n}<br \/>\n<\/b><br \/>\n<\/code><\/p>\n<p> &#8230; into <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/SlidingMenus\/sliding_menus.html-GETME\">sliding_menus.html<\/a> (changed <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/SlidingMenus\/sliding_menus.html-GETME\">this way<\/a>), with the &#8220;star&#8221; line of (CSS) code &#8220;<b><i>mix-blend-mode: screen;<\/i><\/b>&#8220;.<\/p>\n<p>Another important CSS thing to note here, to help &#8220;import&#8221; a <a target=_blank title='Google font' href='http:\/\/www.google.com'>Google<\/a> font, thanks, is the use of CSS &#8220;import&#8221; (that the Mac iWeb template based RJM Programming <a target=_blank title='RJM Programming landing page' href='http:\/\/www.rjmprogramming.com.au'>landing page<\/a> also makes use of) <a target=_blank title='CSS import rule information' href='http:\/\/www.cssnewbie.com\/css-import-rule\/'>rule<\/a>s &#8230; okay?!<\/p>\n<hr>\n<p id='html\/j\/phpcvdit'>Previous relevant <a target=_blank title='HTML\/Javascript\/PHP Canvas Venn Diagram Import Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/html\/javascript\/php-canvas-venn-diagram-import-tutorial\/'>HTML\/Javascript\/PHP Canvas Venn Diagram Import Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Canvas\/VennDiagram\/\"><img decoding=\"async\" style=\"float:left;border: 15px solid pink;\" alt=\"HTML\/Javascript\/PHP Canvas Venn Diagram Import Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Canvas\/VennDiagram\/Venn_Diagram_Email_More.jpg\" title=\"HTML\/Javascript\/PHP Canvas Venn Diagram Import Tutorial\"  \/><\/a><p class=\"wp-caption-text\">HTML\/Javascript\/PHP Canvas Venn Diagram Import Tutorial<\/p><\/div>\n<p>It&#8217;s been a year and a half since the last <a title='HTML\/Javascript Canvas Venn Diagram Email Tutorial' href='#hjcvdet'>HTML\/Javascript Canvas Venn Diagram Email Tutorial<\/a> as shown below concerning our web application that can create online Venn Diagrams.  On that last occasion we set up a system of sharing email communication regarding these Venn Diagrams, and the screenshot of that Venn Diagram took the form of an email body containing a link to an RJM Programming web server <i>png<\/i> image file, effectively Exporting the Venn Diagram.  With what we know now email possibilities involve &#8230;<\/p>\n<ul>\n<li>email with or without attachment using PHP mail function via server-side logic &#8230; or &#8230;<\/li>\n<li>email via <a target=_blank title='mailto information from w3schools' href='http:\/\/www.w3schools.com\/tags\/tryit.asp?filename=tryhtml_link_mailto'><i>mailto:<\/i><\/a> tags linking to an RJM Programming web server image file as a snapshot of the HTML5 <a target=_blank title='HTML Canvas element information from w3schools' href='http:\/\/www.w3schools.com\/tags\/ref_canvas.asp'>canvas<\/a> element&#8217;s contents &#8230; or &#8230;<\/li>\n<li>email via <a target=_blank title='mailto information from w3schools' href='http:\/\/www.w3schools.com\/tags\/tryit.asp?filename=tryhtml_link_mailto'><i>mailto:<\/i><\/a> tags with a body content reflecting the HTML5 <a target=_blank title='HTML Canvas element information from w3schools' href='http:\/\/www.w3schools.com\/tags\/ref_canvas.asp'>canvas<\/a> element&#8217;s contents as a clipboard image <i>pasted<\/i> into it, via the <a target=_blank title='HTML Canvas element information from w3schools' href='http:\/\/www.w3schools.com\/tags\/ref_canvas.asp'>canvas<\/a> element&#8217;s <a target=_blank title='HTML5 canvas element toDataURL method information' href='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/HTMLCanvasElement\/toDataURL'>toDataURL<\/a>() method, teamed up with a <a target=_blank href='http:\/\/www.w3schools.com\/jsref\/met_win_open.asp' title='window.open information from w3schools'><i>window.open<\/i><\/a> popup window of the <i>toDataURL<\/i> image data, which can be <i>selected<\/i> and <i>copied<\/i>, optionally, by the user themselves, should they wish this to make their email more self explanatory<\/li>\n<\/ul>\n<p> &#8230; and so with our Venn Diagram email functionality we offer those last two possibilities, the second of which is new functionality.<\/p>\n<p>We also add on, today, an Importing functionality, making use of the web server image file from the first, and original, of those two emailing possibilities above. The HTML5 <a target=_blank title='HTML Canvas element information from w3schools' href='http:\/\/www.w3schools.com\/tags\/ref_canvas.asp'>canvas<\/a> element&#8217;s <a target=_blank title='HTML5 canvas drawImage() method information from w3schools' href='http:\/\/www.w3schools.com\/tags\/canvas_drawimage.asp'>drawImage()<\/a> method is used to copy that web server image data onto the canvas.<\/p>\n<p>In order to collect this Importable web server image file list into an HTML select (dropdown) element we make use of PHP (in an HTML iframe element) and the <a target=_blank title='PHP glob() method information' href='http:\/\/php.net\/manual\/en\/function.glob.php'><i>glob<\/i>()<\/a> method to collect a list of files in a directory, according to a file specification.  We do that during the web page&#8217;s <i>onload<\/i> event, and look back at a <i>parent.document<\/i> select element.<\/p>\n<p>Link to some downloadable HTML programming code &#8230; rename to <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Canvas\/VennDiagram\/venn_diagram.html--GETME' title='venn_diagram.html'>venn_diagram.html<\/a> (and how it changed &#8230; <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Canvas\/VennDiagram\/venn_diagram.html--GETME' title='venn_diagram.html'>venn_diagram.html<\/a>) and its <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Canvas\/VennDiagram\/venn_diagram.html' title='venn_diagram.html'>live run<\/a><br \/>\nLink to some new downloadable PHP programming code &#8230; rename to <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Canvas\/VennDiagram\/venn_diagram.php--GETME' title='venn_diagram.php'>venn_diagram.php<\/a> (and how it changed &#8230; <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Canvas\/VennDiagram\/venn_diagram.php--GETME' title='venn_diagram.php'>venn_diagram.php<\/a>)<\/p>\n<hr \/>\n<p id='hjcvdet'>Previous relevant <a target=_blank title='HTML\/Javascript Canvas Venn Diagram Email Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/htmljavascript-canvas-venn-diagram-email-tutorial\/'>HTML\/Javascript Canvas Venn Diagram Email Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Canvas\/VennDiagram\/\"><img decoding=\"async\" style=\"float:left;border: 15px solid pink;\" alt=\"HTML\/Javascript\/PHP Canvas Venn Diagram Email Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Canvas\/VennDiagram\/Venn_Diagram_Email.jpg\" title=\"HTML\/Javascript\/PHP Canvas Venn Diagram Email Tutorial\"  \/><\/a><p class=\"wp-caption-text\">HTML\/Javascript\/PHP Canvas Venn Diagram Email Tutorial<\/p><\/div>\n<p>Was reminded about the previous <a target=_blank title='HTML\/Javascript Canvas Venn Diagram Tutorial' href='#hjcvdt'>HTML\/Javascript Canvas Venn Diagram Tutorial<\/a> as shown below because of a pleasant comment from a user making use of its functionality &#8230; thanks and yayyyyyyy team!<\/p>\n<p>Looking over it again, though, some functionality to allow a snapshot image of the canvas element be allowed to be accessible via an email link to this saved image on the rjmprogramming.com.au domain, would be useful methinks &#8230; forsooth?!<\/p>\n<p>Yet again we need PHP, because we are writing a file on to our web server, so we&#8217;ll just have to disappoint those without PHP &#8230; sorrrrrryyyy.<\/p>\n<p>At the client side, with Javascript, you&#8217;ll find the HTML5 Javascript&#8217;s canvas method <a target=_blank title='Javascript canvas toDataURL() method information from w3schools' href='http:\/\/www.w3schools.com\/tags\/ref_canvas.asp'><i>toDataURL()<\/i><\/a> useful.   How?<\/p>\n<ul>\n<li>onload arrange a good filename to be supplied via a Javascript <a target=_blank title='Javascript DOM information from w3schools' href='http:\/\/www.w3schools.com\/js\/js_htmldom.asp'>DOM<\/a> save to a <a target=_blank title='Form information from w3schools' href='http:\/\/www.w3schools.com\/tags\/tag_form.asp'>form<\/a>&#8216;s hidden <a target=_blank title='Input information from w3schools' href='http:\/\/www.w3schools.com\/tags\/tag_input.asp'>input<\/a> HTML field<\/li>\n<li>the user asks for an Email Snapshot to be emailed and the webpage uses Javascript DOM to save to its form&#8217;s hidden input HTML field the result of the canvas&#8217;s call to <i>toDataURL()<\/i><\/li>\n<li>programmatically post the form (by programmatically clicking the form&#8217;s submit button)  with a <a target=_blank title='Form href target property information from w3schools' href='http:\/\/www.w3schools.com\/tags\/att_form_target.asp'>target<\/a> pointing to id of an <a target=_blank title='Iframe information from w3schools' href='http:\/\/www.w3schools.com\/tags\/tag_iframe.asp'>iframe<\/a> with a URL of our venn_diagram.php<\/li>\n<li>have venn_diagram.php (of that iframe) create a png image from the <a target=_blank title='Data URL (or Data URI) information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Data_URI_scheme'>data URL<\/a> and the file name posted across using PHP&#8217;s <a target=_blank title='PHP base64_decode() method information' href='http:\/\/php.net\/manual\/en\/function.base64-decode.php'>base64_decode<\/a> and <a target=_blank title='PHP file_put_contents() method information' href='http:\/\/php.net\/manual\/en\/function.file-put-contents.php'>file_put_contents()<\/a> methods (great to use with data URL data) &#8230; thanks to <a target=_blank title='Great ideas here' href='http:\/\/stackoverflow.com\/questions\/9771986\/fabric-js-canvas-todataurl-sent-to-php-by-ajax'>this link<\/a> for great ideas<\/li>\n<li>back at venn_diagram.html use Javascript DOM to update an HTML <a target=_blank title='a tag information from w3schools' href='http:\/\/www.w3schools.com\/tags\/tag_a.asp'><i>a<\/i><\/a> tag&#8217;s <a target=_blank title='mailto information' href='http:\/\/www.w3schools.com\/tags\/tryit.asp?filename=tryhtml_link_mailto'>mailto:<\/a> (href property) link with the name of the png image file created in previous step being the email&#8217;s body, which, on arrival at the recipient, becomes a link to the snapshot image on the web, viewable with their default web browser<\/li>\n<li>programmatically click the HTML <i>a<\/i> tag to open your local client mail program with a primed email<\/li>\n<li>change the email address appropriately, and anything else you&#8217;d like to change<\/li>\n<li>click the Send button<\/li>\n<li>&#8230; sun goes down &#8230; sun comes up &#8230; (email) recipient wakes from a dream about pins, boulders and lemon curry (you had to be there) &#8230; reads email &#8230; is a little shocked &#8230; but &#8230; clicks link of email &#8230;<\/li>\n<li>recipient sees the Venn Diagram (snapshot) in their default web browser<\/li>\n<\/ul>\n<p>Here is a <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Canvas\/VennDiagram\/\" title=\"HTML\/Javascript Canvas Venn Diagram Tutorial\">live run<\/a> showing some client-side basics in HTML and Javascript that can be used to create your own Venn Diagrams.   Were Venn Diagrams something you learnt at school, to do with &#8220;set theory&#8221;?   It can be an interesting area of mathematics, and statistics, perhaps.    In today&#8217;s tutorial we do an example involving Geckoes &#8230; yes, <a target=_blank title='Gecko information from Wikipedia' href='http:\/\/en.wikipedia.org\/wiki\/Gecko'>Geckoes<\/a> &#8230; not echoes &#8230; but, Geckoes &#8230; the inspiration for which came from this great <a target=_blank title='Venn diagram Geckoes problem' href='http:\/\/www.purplemath.com\/modules\/venndiag4.htm'>link<\/a> (thanks).   You can read about it from Wikipedia <a target=_blank title='Venn diagram information from Wikipedia' href='http:\/\/en.wikipedia.org\/wiki\/Venn_diagram'>here<\/a>.<\/p>\n<p>This HTML\/Javascript solution uses an HTML canvas element, which you can first read about, at this blog, <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=5539' title='HTML\/Javascript Canvas Primer Tutorial'>here<\/a>.<\/p>\n<p>You may want to read more at <a target=_blank title='HTML Canvas Reference' href='http:\/\/www.w3schools.com\/tags\/ref_canvas.asp'>HTML Canvas Reference<\/a> as a generic reference, or here, at the tutorial <a target=_blank title='javascript - How do I add a simple onClick event handler to a canvas element? - Stack Overflow' href='http:\/\/stackoverflow.com\/questions\/9880279\/how-do-i-add-a-simple-onclick-event-handler-to-a-canvas-element'>javascript &#8211; How do I add a simple onClick event handler to a canvas element? &#8211; Stack Overflow<\/a>.<\/p>\n<p>Here is a very useful <a target=_blank title='Circle intersection algorithm ... thanks' href='http:\/\/stackoverflow.com\/questions\/8367512\/algorithm-to-detect-if-a-circles-intersect-with-any-other-circle-in-the-same-pla'>link<\/a> that helped with an algorithm to determine if two circles intercept &#8230; thanks.<\/p>\n<p>Link to some downloadable HTML programming code &#8230; rename to <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Canvas\/VennDiagram\/venn_diagram.html-GETME' title='venn_diagram.html'>venn_diagram.html<\/a> (and how it changed &#8230; <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Canvas\/VennDiagram\/venn_diagram.html-GETME' title='venn_diagram.html'>venn_diagram.html<\/a>)<br \/>\nLink to some new downloadable PHP programming code &#8230; rename to <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Canvas\/VennDiagram\/venn_diagram.php-GETME' title='venn_diagram.php'>venn_diagram.php<\/a>\n<\/p>\n<hr \/>\n<p id='hjcvdt'>Previous relevant <a target=_blank title='HTML\/Javascript Canvas Venn Diagram Tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=5692'>HTML\/Javascript Canvas Venn Diagram Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Canvas\/VennDiagram\/VennDiagram.m4v\"><img decoding=\"async\" style=\"float:left;border: 15px solid pink;\" alt=\"HTML\/Javascript Canvas Venn Diagram Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Canvas\/VennDiagram\/VennDiagram.jpg\" title=\"HTML\/Javascript Canvas Venn Diagram Tutorial\"  \/><\/a><p class=\"wp-caption-text\">HTML\/Javascript Canvas Venn Diagram Tutorial<\/p><\/div>\n<p>Here is a <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Canvas\/VennDiagram\/\" title=\"HTML\/Javascript Canvas Venn Diagram Tutorial\">live run<\/a> showing some client-side basics in HTML and Javascript that can be used to create your own Venn Diagrams.   Were Venn Diagrams something you learnt at school, to do with &#8220;set theory&#8221;?   It can be an interesting area of mathematics, and statistics, perhaps.    In today&#8217;s tutorial we do an example involving Geckoes &#8230; yes, <a target=_blank title='Gecko information from Wikipedia' href='http:\/\/en.wikipedia.org\/wiki\/Gecko'>Geckoes<\/a> &#8230; not echoes &#8230; but, Geckoes &#8230; the inspiration for which came from this great <a target=_blank title='Venn diagram Geckoes problem' href='http:\/\/www.purplemath.com\/modules\/venndiag4.htm'>link<\/a> (thanks).   You can read about it from Wikipedia <a target=_blank title='Venn diagram information from Wikipedia' href='http:\/\/en.wikipedia.org\/wiki\/Venn_diagram'>here<\/a>.<\/p>\n<p>This HTML\/Javascript solution uses an HTML canvas element, which you can first read about, at this blog, <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=5539' title='HTML\/Javascript Canvas Primer Tutorial'>here<\/a>.<\/p>\n<p>You may want to read more at <a target=_blank title='HTML Canvas Reference' href='http:\/\/www.w3schools.com\/tags\/ref_canvas.asp'>HTML Canvas Reference<\/a> as a generic reference, or here, at the tutorial <a target=_blank title='javascript - How do I add a simple onClick event handler to a canvas element? - Stack Overflow' href='http:\/\/stackoverflow.com\/questions\/9880279\/how-do-i-add-a-simple-onclick-event-handler-to-a-canvas-element'>javascript &#8211; How do I add a simple onClick event handler to a canvas element? &#8211; Stack Overflow<\/a>.<\/p>\n<p>Here is a very useful <a target=_blank title='Circle intersection algorithm ... thanks' href='http:\/\/stackoverflow.com\/questions\/8367512\/algorithm-to-detect-if-a-circles-intersect-with-any-other-circle-in-the-same-pla'>link<\/a> that helped with an algorithm to determine if two circles intercept &#8230; thanks.<\/p>\n<p>Link to some downloadable HTML programming code &#8230; rename to <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Canvas\/VennDiagram\/venn_diagram.html_GETME' title='venn_diagram.html'>venn_diagram.html<\/a>\n<\/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='#d5692' onclick='var dv=document.getElementById(\"d5692\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?cat=59\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d5692' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr \/>\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='#d11558' onclick='var dv=document.getElementById(\"d11558\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=canvas\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d11558' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\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='#d23090' onclick='var dv=document.getElementById(\"d23090\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=email\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d23090' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\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='#d31907' onclick='var dv=document.getElementById(\"d31907\"); 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='d31907' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>We read a great website, thanks, the other day, talking about CSS (multiple background, and other) &#8220;blending&#8221;, basically concerning behaviours that happen when two colours &#8220;overlap&#8221; in a webpage. This webpage talked about this in terms of your predictable HTML &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/css-blend-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,37],"tags":[2290,184,281,354,451,513,2292,576,578,602,652,894,997,2291,2167,1319,1367],"class_list":["post-31907","post","type-post","status-publish","format-standard","hentry","category-elearning","category-tutorials","tag-blend","tag-canvas","tag-css","tag-dom","tag-font","tag-google","tag-heading","tag-html","tag-html5","tag-import","tag-javascript","tag-overlay","tag-programming","tag-sliding-menu","tag-title","tag-tutorial","tag-venn-diagram"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/31907"}],"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=31907"}],"version-history":[{"count":5,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/31907\/revisions"}],"predecessor-version":[{"id":31912,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/31907\/revisions\/31912"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=31907"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=31907"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=31907"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}