t4setr

Requires FM 1.0 Beta 8.5 (Nov 2007) or newer

Syntax

void t4setr(int d, int m, int z, int v)

Arguments

d
An integer direction from the origin in the fourth tile buffer.
m
An integer magnitude from the origin in the fourth 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 fourth 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

%ffp

ForEveryTile:
{
int d, m;

for (d=0; d<1024; ++d)
{
	for (m=0; m<256; m+=3)
	{
		for (z=0; z<Z; ++z)
		{
			t4setr(d, m, z, 256); // create white circles
		}
	}
}

return true;

}

See Also

pgetr, tsetr, tgetr, t4getr

Comments

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