tset

Syntax

void tset(int x, int y, int z, int v)

Arguments

x
An integer pixel x-coordinate in the first tile buffer.
y
An integer pixel y-coordinate in the first 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.

Description

This function sets the value of one channel for a pixel in the first 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

%ffp

ForEveryTile:
{
  for (y=y_start; y < y_end; ++y)
  {
    for (x=x_start; x < x_end; ++x)
    {
      for (z=0; z < Z; ++z)
      {
        // set all pixels white
        tset(x, y, z, 255);
      }
    }
  }
  return true;
}

See Also

pset, t2set, tget

Comments

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