Older Newer
Sat, 05 Apr 2003 21:26:20 . . . . (Pete)?


Changes by last author:

Added:
= t2set =

== Syntax ==

:void t2set(int x, int y, int z, int v)

== Arguments ==

:x

::An integer pixel x-coordinate in the second tile buffer.

:y

::An integer pixel y-coordinate 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; the pixel is at coordinates [x,y], and the channel to be set is given by 'z' (0 = red, 1 = green, 2 = blue, and 3 = alpha).

== Example ==

<code>

%ffp

ForEveryTile:

{

for (y=y_start; y<y_end; ++y)

{

for (x=x_start; x<x_end; ++x)

{

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

{

t2set(x, y, z, 255); // set all pixels to white!

}

}

}

return true;

}

</code>

== Also see ==

:pset,tset,t2get

== Comments ==

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