t4set

Requires FM 1.0 Beta 8.5 (Nov 2007) or newer

Syntax

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

Arguments

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

Description

This function sets the value of one channel for a pixel in the fourth 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
        t4set(x, y, z, 255);
      }
    }
  }
  return true;
}

See Also

pset, tset, tget, t4get