Older Newer
Sat, 05 Apr 2003 21:23:42 . . . . (Pete)?


Changes by last author:

Added:
= t2setr =

== Syntax ==

:void t2setr(int d, int m, int z, int v)

== Arguments ==

:d

::An integer direction from the origin in the second tile buffer.

:m

::An integer magnitude from the origin in the second tile buffer.

:z

::An integer channel number in the range 0 to 3.

:v

::An integer value to be set for channel 'z', in the range 0 to 255.

== Return ==

:None

== Description ==

:This function sets the value of one channel for a pixel in the second tile buffer, using polar coordinates (rather than cartesian) to address the pixel; the polar coordinates are relative to the image center. The channel to be set is given by 'z' (0 = red, 1 = green, 2 = blue, and 3 = alpha). NOTE: There is no guarantee that this function is able to completely populate the plane - some pixels in the output buffer may be unreachable because of rounding errors.

== Example ==

<code>

%ffp

ForEveryTile:

{

int d, m;

for (d=0; d<1024; ++d)

{

for (m=0; m<256; m+=3)

{

for (z=0; z<Z; ++z)

{

t2setr(d, m, z, 0); // create black circles

}

}

}

return true;

}

</code>

== Also see ==

:psetr,tsetr,t2getr

== Comments ==

:Everyone can add his comments about his experiences with this function here. Tips for using it are welcome, too.