Page 1 of 1

Canvas graphic effects

PostPosted: Sat Dec 04, 2010 2:00 pm
by sportmaster
Anybody wants a point from me :) ? so please tell me how to display something like this :

Re: Canvas graphic effects

PostPosted: Sat Dec 04, 2010 2:51 pm
by lcl
For example you can do that:

Place this code to canvas actor's create actor code:
Code: Select all
int i; //set variables
int j;
int counter;

erase(0, 0, 0, 1);

for (i = 0; i < 85; i ++) //from dark to light
{
    setpen(0, i * 3, 0, 0, 1); //Set color
    moveto(0, i);
    lineto(width, i);
}
for (j = 85; j > 1; j --) //from light to dark
{
    counter ++;
    setpen(0, j * 3, 0, 0, 1); //set color
    moveto(0, counter + 84);
    lineto(width, counter + 84);
}

:D Did that help you? :D

Re: Canvas graphic effects

PostPosted: Sat Dec 04, 2010 3:52 pm
by sportmaster
That is exactly what I needed :D I'm really happy :D That's what I like, a quick and perfect help with explanations in the code. You absolutely should earn a point from me so there it is: click ! :D

Re: Canvas graphic effects

PostPosted: Sat Dec 04, 2010 5:23 pm
by lcl
Thanks! Glad it helped! :D