/*
 * Name  : DrawFile.c
 * Desc  : Veneers for the draw file module
 * Author: James Bye
 * Date  : 21st June 1993
 */

#include <stdio.h>
#include <stdlib.h>
#include "kernel.h"

#include "DrawFile.h"


extern _kernel_oserror *DrawFile_Render ( DrawFile_Flags flags,
                                          DrawFile_Data  data,
                                          int size,
                                          DrawFile_TransMatStr *tm,
                                          DrawFile_ClipBBoxStr *clipbbox,
                                          int x, int y, int flatness )
{
_kernel_swi_regs r;                                   
DrawFile_TransMatStr transmat;

  if(!tm)
  {
    transmat.x0 = 1 << 16;
    transmat.y0 = 0;
    transmat.x1 = 0;
    transmat.y1 = 1 << 16;
    transmat.x2 = 256 * x;
    transmat.y2 = 256 * y;
  }

  r.r[0] = flags;
  r.r[1] = (int) data;
  r.r[2] = size;
  if(!tm)
    r.r[3] = (int)&transmat;
  else
    r.r[3] = (int) tm;
  r.r[4] = (int) clipbbox;
  r.r[5] = flatness;

  return(_kernel_swi(Render,&r,&r));
}

