Editing User:Ziggy
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 4: | Line 4: | ||
Skills=software development (programming), wiki (MediaWiki) admin, inspirational writing, RBE10K coordination | Skills=software development (programming), wiki (MediaWiki) admin, inspirational writing, RBE10K coordination | ||
Interests=RBE, earthship (housing), teams support, wiki structure, solar updraft tower (energy), nutrition (food) | Interests=RBE, earthship (housing), teams support, wiki structure, solar updraft tower (energy), nutrition (food) | ||
− | Settler=yes | + | Settler=yes! |
</data> | </data> | ||
Line 135: | Line 135: | ||
== Test == | == Test == | ||
− | + | <html> | |
− | <html> | + | <head> |
− | <head> | + | <style> |
− | <style> | + | html { |
− | html { | + | background: url(World-map.jpg) no-repeat center center fixed; |
− | + | -webkit-background-size: cover; | |
− | + | -moz-background-size: cover; | |
− | + | -o-background-size: cover; | |
− | + | background-size: cover; | |
− | + | } | |
− | } | + | </style> |
− | </style> | + | |
− | + | </head> | |
− | </head> | + | <body> |
− | <body> | + | <h2 id=coords>coords</h2><br> |
− | <h2 id=coords>coords</h2><br> | + | <h2 id=imgdata>imgdata</h2> |
− | <h2 id=imgdata>imgdata</h2> | + | <canvas id="canvas" style="display: none;"> |
− | <canvas id="canvas" style="display: none;"> | + | <img style="position: absolute; top: 30%; left:30%; margin-top: -32px; margin-left: -32px;" src="dot.gif"/> |
− | <img style="position: absolute; top: 30%; left:30%; margin-top: -32px; margin-left: -32px;" src="dot.gif"/> | + | |
− | + | <script> | |
− | <script> | + | var img = new Image(); |
− | var img = new Image(); | + | img.src = 'World-map.jpg'; |
− | img.src = 'World-map.jpg'; | + | img.src = img.src + '?' + new Date().getTime(); |
− | img.src = img.src + '?' + new Date().getTime(); | + | img.setAttribute('crossOrigin', ''); |
− | img.setAttribute('crossOrigin', ''); | + | var ctx = canvas.getContext('2d'); |
− | var ctx = canvas.getContext('2d'); | + | //var canvas = document.createElement('canvas'); |
− | //var canvas = document.createElement('canvas'); | + | img.onload = function() { |
− | img.onload = function() { | + | //alert(this.width + 'x' + this.height); |
− | + | canvas.width = this.width; | |
− | + | canvas.height = this.height; | |
− | + | ctx = canvas.getContext('2d'); | |
− | + | //canvas.getContext('2d').drawImage(img, 0, 0, img.width, img.height); | |
− | + | ctx.drawImage(img, 0, 0); | |
− | + | ||
− | + | imgdata.innerHTML = "X: " + this.width + ", Y: " + this.height + | |
− | + | ", DX: " + document.body.clientWidth + ", DY: " + document.body.clientHeight; | |
− | + | } | |
− | } | + | |
− | + | function printMousePos(event) { | |
− | function printMousePos(event) { | + | var X = event.clientX; |
− | + | var Y = event.clientY; | |
− | + | var pixelData = ctx.getImageData(X, Y, 1, 1).data; | |
− | + | coords.innerHTML = | |
− | + | "X: " + X + ", Y: " + Y; /* + | |
− | + | ", R: " + pixelData[0] + ", G: " + pixelData[1] + ", B: " + pixelData[2] + ", A: " + pixelData[3]; */ | |
− | + | } | |
− | } | + | document.addEventListener("click", printMousePos); |
− | document.addEventListener("click", printMousePos); | + | |
− | + | </script></body> | |
− | </script></body> | + | </html> |
− | </html> | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
== See also == | == See also == |