= set_edge_mode =
== Syntax == int set_edge_mode(int mode) == Arguments == :mode ::Set to 0 for a repeating edge, 1 for a black border around the image, 2 to wrap around the edges of the image to the other side, 3 to mirror the edges of the image. == Return == False / zero if the mode value is out of range (less than 0 or greater than 4). True otherwise. == Description == Sets how the plug-in should behave when accessing pixels beyond the edges of the image (ie whether the plug-in should show those pixels as black, mirror the edge, or wrap around to the other side of the image). == Example == <code> %ffp ctl(0): "Edge Mode", Range=(0,3), val=0 ctl(1): "Image Offset", Range=(0,100), val=30 ForEveryTile:{ int r, g, b, offset; set_edge_mode( ctl(0) ); offset = ctl(1); for (y= y_start; y < y_end; y++) { if (updateProgress(y, y_end)) abort(); for (x = x_start; x < x_end; x++) { r = src(x-offset, y-offset, 0); g = src(x-offset, y-offset, 1); b = src(x-offset, y-offset, 2); pset( x, y, 0, r ); pset( x, y, 1, g ); pset( x, y, 2, b ); } } return true; }</code> == See Also == |