This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var canvas = document.getElementById('myCanvas'); | |
paper.setup(canvas); | |
var path = new paper.Path(); | |
// ... change this color | |
path.strokeColor = 'green'; | |
// ... change the starting point of the line | |
var start = new paper.Point(30, 92); | |
path.moveTo(start); | |
// ... change the final point |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
With the following code you can create a static url that automatically redirect to the apod (Astronomy Image of the day | |
* You can use it like wallpaper in your Firefox's about:home page. Look at next file | |
Download Simple HTML parser from here: | |
http://simplehtmldom.sourceforge.net/ | |
*/ | |
<?php | |
$firefoxgalaxy="/image/0502/v838monOct2004_hst_f.jpg"; | |
include('simple_html_dom.php'); | |
$url="http://apod.nasa.gov"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//extracted of http://davidwalsh.name/convert-canvas-image | |
function convertImageToCanvas(image) { | |
var canvas = document.createElement("canvas"); | |
canvas.width = image.width; | |
canvas.height = image.height; | |
canvas.getContext("2d").drawImage(image, 0, 0); | |
return canvas; | |
} | |
function convertCanvasToImage(canvas) { |