Older Newer
Sun, 10 Dec 2017 06:36:32 . . . . SyneRyder

Changes by last author:

= t4get =

== Syntax ==

:int t4get(int x, int y, int z)

== Arguments ==


::The x coordinate of the pixel to be retrieved.


::The y coordinate of the pixel to be retrieved.


::The channel number to be retrieved for the pixel: 0->red, 1->green, 2->blue, 3->alpha.

== Return ==

:The integer value of the specified pixel for the specified channel.

== Description ==

:This function retrieves the value of a specified channel 'z' from the pixel at position (x,y) in the fourth of FilterMeister's tile buffers. The coordinates should usually be within the image, ie 0<=x<=X and 0<=y<=Y, while the channel number z should be in the range 0 to 3 inclusive. Channels 0, 1 and 2 are the red, green and blue channels respectively (when in RGB mode), while channel 3 is the alpha (transparency) channel and is valid only on a layer.

== Example ==


// Copy tile buffer 4 to the output buffer

for (y=y_start; y<Y; ++y) {

for (x=x_start; x<X; ++x) {

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

pset(x, y, z, t4get(x, y, z));





== Also see ==

:src, pget, tget, pset, tset, t4set

== Comments ==

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