# A child class of ToyPPM.  Provides a _fast_ draw_line() method.

package ExtendedToyPPM;
@ISA = 'ToyPPM';
use ToyPPM;
use ToyDrawLine;

use Inline C =>
    (
     ToyPPM->get_toy_api_ImageCMacros() .
     ToyDrawLine->get_toy_api_PointsOfLineCMacros().
     <<'""""'
void draw_line (SV* self,
		int x1, int y1, int x2, int y2,
                int r, int g, int b)
{
    DECL(self);
    INIT(self);

#   define Point(x,y)  SET_RGB(x,y, r,g,b)
    POINTS_OF_LINE(x1, y1, x2, y2);
}
""""
     );


1;