DrawIop

The DrawIop class provides a further specialisation of PixelIop for classes which create a shape to use as a mask for drawing some pixels on top of the output buffer. For example, the plugins “Grid”, “Noise”, “Radial”, “Ramp”, “Rectangle” and “Text” that are provided with NUKE are DrawIops.

DrawIops must implement the function

void DrawIop::draw_engine(int y, int x, int r, float* buffer)

This should fill in buffer[x] to buffer[r] with a mask, which will be combined with the colour, the ramp, the mask input, in the DrawIop’s implementation of pixel_engine. Pixels should be set to 1 for full drawing, 0, for no drawing, and values in between for partial. If the buffer would be filled entirely with zeroes, you can return false, and then it can quickly copy the background input. Otherwise the function should return true.