Created
September 3, 2011 15:06
-
-
Save stesla/1191313 to your computer and use it in GitHub Desktop.
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 paper = Raphael("gradients", 785, 200); | |
var circle = paper.circle(130, 100, 75); | |
// Simple 90 degree gradient from white to black | |
circle.attr("fill", "90-#fff-#000"); | |
// 0 degree gradient from white to black, via red at 20% | |
circle.clone().translate(175).attr("fill", "0-#fff-#f00:20-#000"); | |
// Radial gradient from white to black | |
circle.clone().translate(350).attr("fill", "r#fff-#000"); | |
// Radiel gradient from white to black at focus point (0.25, 0.75) | |
circle.clone().translate(525).attr("fill", "r(0.25, 0.75)#fff-#000"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment