Angle gradient in canvas
A context strokeStyle can be a gradient: // create a gradient gradient = ctx.createLinearGradient(xStart, yStart, xEnd, yEnd); gradient.addColorStop(0.0,”blue”); gradient.addColorStop(1.0,”purple”); // stroke using that gradient ctx.strokeStyle = gradient; Example code and a Demo using a gradient strokeStyle: http://jsfiddle.net/m1erickson/w46ps/ <!doctype html> <html> <head> <link rel=”stylesheet” type=”text/css” media=”all” href=”https://stackoverflow.com/questions/22223950/css/reset.css” /> <!– reset css –> <script type=”text/javascript” src=”http://code.jquery.com/jquery.min.js”></script> <style> … Read more