Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: HTML HTML5 Canvas
Hi all
 
How does HTML5 canvas createLinearGradient method works???
 
Thanks
Posted 14-Jun-12 2:36am
Mac123341.1K
Edited 14-Jun-12 2:39am
v2

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

From w3schools:
 
The createLinearGradient method creates a gradient object that changes from one color to another.
You can specify how and where these changes will take place, using the coordinate parameters.
The x0 and y0 parameters represents the start coordinates of the gradient.
The x1 and y1 parameters represents the end coordinates of the gradient.

 
http://www.w3schools.com/html5/canvas_createlineargradient.asp[^]
 
I wonder if looking at Google is so difficult?
  Permalink  
Comments
Prasad_Kulkarni at 14-Jun-12 8:13am
   
5'ed
Manas Bhardwaj at 14-Jun-12 8:47am
   
thanks!
Arunprasath Natarajan at 14-Jun-12 8:26am
   
Well explained
Manas Bhardwaj at 14-Jun-12 8:47am
   
thanks!
MAC123456 at 14-Jun-12 8:57am
   
Thanks Manas
Sry :(
Manas Bhardwaj at 15-Jun-12 3:27am
   
No problem. Glad it helped you :)
Espen Harlinn at 14-Jun-12 17:12pm
   
5'ed!
Manas Bhardwaj at 15-Jun-12 3:27am
   
thanx!
VJ Reddy at 15-Jun-12 6:26am
   
Good answer. 5!
Manas Bhardwaj at 15-Jun-12 6:36am
   
thnx!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 290
1 Jochen Arndt 150
2 Kornfeld Eliyahu Peter 149
3 PIEBALDconsult 110
4 Richard MacCutchan 105
0 OriginalGriff 6,080
1 DamithSL 4,648
2 Maciej Los 4,087
3 Kornfeld Eliyahu Peter 3,624
4 Sergey Alexandrovich Kryukov 3,294


Advertise | Privacy | Mobile
Web03 | 2.8.141220.1 | Last Updated 14 Jun 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100