#ifndef VFONT_H
#include <vfont/vfont.h>
#endif
#ifndef LIBRARIES_DOS_H
#include <libraries/dos.h>
#endif

/* transform.c */
void Transform(struct tPoint *Vertix, unsigned long cnt, long sx, long sy, long a, struct tPoint *r, struct tPoint *t, struct tPoint *min, struct tPoint *max);
void Rotate(struct tPoint *Vertix, unsigned long cnt, long sina, long cosa, short rx, short ry);
void Scale(struct Points *Vector, struct tPoint *from, struct tPoint *to, short sym_x, short sym_y);
void Transpose(struct tPoint *Vertix, unsigned long cnt, short tx, short ty);
/* curve.c */
long Bend(struct Points *pts, unsigned char r, unsigned char e, unsigned long flags);
short ThickEntry(long dx, long dy);
unsigned long Cross(struct line *l1, struct line *l2, struct tPoint *P);
void Widen(struct tPoint *verticies, unsigned long Count, struct Points *l1, struct Points *l2, unsigned short t);
void PolyCDraw(struct RastPort *RPort, struct tPoint *vertices, unsigned long cnt, unsigned short t);
void PolyACDraw(struct RastPort *RPort, struct tPoint *vertices, unsigned long cnt, unsigned short t);
void DrawCurve(struct RastPort *RPort, struct Curve *curve, short x, short y);
/* vfont.c */
unsigned short VTextLength(struct VFont *vFont, unsigned char *text, unsigned short count);
unsigned short VTextRoof(struct VFont *vFont, unsigned char *text);
void MakeChar(struct VFont *vFont, struct VFontClass *vFontDef, short c);
void ReThinkVFont(struct VFont *font);
void UnmapVFont(struct VFont *font);
struct VFont *OpenVFont(struct TextVAttr *textVAttr);
struct TextFont *OpenBFont(struct TextVAttr *textVAttr);
struct VFont *GetVFont(struct RastPort *RPort);
void SetVFont(struct RastPort *RPort, struct VFont *vFont);
void ChangeVFont(struct VFont *font, unsigned char mask, struct VFont *req, unsigned long mapped);
unsigned long LockVFont(struct VFont *font, unsigned long busywait);
void UnLockVFont(struct VFont *font);
void CloseVFont(struct VFont *font);
void VText(struct RastPort *RPort, unsigned char *text, unsigned long length);
void VColorText(struct RastPort *RPort, unsigned char *text, unsigned long length);
void PrintVText(struct RastPort *RPort, struct VectorText *vText);
void SetVRendering(struct VFont *font, long fcolor, long bcolor, long drmd);
void FlushWhat(short kind);
void LockVBase(void);
void UnlockVBase(void);
void RemVClass(struct VFontClass *class);
void RemVFont(struct VFont *font, short flush);
/* loadsave.c */
unsigned long AlertUser(char *prompt, short flags);
unsigned long SaveVFont(struct TextVAttr *tva);
unsigned char *LoadVFont(struct TextVAttr *tva);
struct FontContentsHeader *NewVFontContents(BPTR dir, UBYTE *header);
unsigned long SaveFontAttr(long info, unsigned char *name, unsigned short size, unsigned char flags, unsigned char style, unsigned char *type, short forced);
long CreateFontDir(unsigned char *fontName, unsigned char *dirName);

/* memory stuff. */
APTR VAllocMem(unsigned long size, unsigned long mem_opt);
void VFreeMem(APTR block, unsigned long size);
void FlushFonts(unsigned short what);
void PurgeMemory(void);

/* Special */
void EnableVFonts(void);
struct TextFont *VOpenDiskFont(struct TextAttr *ta);
