t3setr
Syntax
- void t3setr(int d, int m, int z, int v)
Arguments
- d
- An integer direction from the origin in the third tile buffer.
- m
- An integer magnitude from the origin in the third 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 third 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)
{
t3setr(d, m, z, 256); // create white circles
}
}
}
return true;
}
Also see
- pgetr, tsetr, tgetr, t3getr
Comments
- Everyone can add his comments about his experiences with this function here. Tips for using it are welcome, too.