Talk:Linear gradient (C)

From LiteratePrograms
Jump to: navigation, search

Okay, some stuff that might need some work :

  • If the initial points are outside the bitmap, the function might cause a segmentation fault. Well, I'm bit lazy at this point to figure what to do to correct this.
  • If two color stop are too close to each other (such as c[i+1].dist - c[i].dist == 0), you will probably get a SIGFPE, in the IterDDA() function. Again, too lazy to fix.

Tpierron 15:47, 28 February 2012 (UTC)

First point is fixed. Missed the special case where y1==y2==0, which caused a crash. Tpierron (talk) 13:09, 26 September 2013 (UTC)

[edit] Downloads and runs now

I've fixed a bug in Extension:DownloadCode that was affecting this article, and made some changes to the article itself. You can now download and run it using the "Download code" tab, provided you have libsdl installed. It's a pretty cool little demo. :-) In general it's discouraged to have code that isn't in any chunk, because it's not possible to test this code - but for now it's okay, that can be fixed later. Dcoetzee 19:18, 9 April 2012 (UTC)

I've got most of the code in chunks now, except for one chunk, and the first example split up a bit into more chunks. Also added the build and run scripts for Linux. There are now three working versions that build and run successfully. Dcoetzee 04:03, 10 April 2012 (UTC)
hijacker
hijacker
hijacker
hijacker