Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- window.onload = function () {
- var drawingSurface = document.getElementById("drawingSurface");
- var ctxt = drawingSurface.getContext("2d");
- ctxt.lineWidth = 3;
- ctxt.rect(150, 150, 250, 175);
- var gradient = ctxt.createRadialGradient(200, 200,5, 250, 250,100);
- gradient.addColorStop(0, "Red");
- gradient.addColorStop(.5, "Orange");
- gradient.addColorStop(1, "Blue");
- ctxt.fillStyle = gradient;
- ctxt.fill();ctxt.stroke();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement