/*
**	SpecialHost for PasTeX
**
**	Copyright © by Olaf Barthel & Georg Heßmann
*/

#define STRSIZE 256

/* Modes */

enum	{	BandW,FS,Burkes,Sierra,JJN,Stucki,BlueNoise,Ordered,Halftone,
		RandomNoise,BckBrick,FwdBrick,Hexagon,SpiralDot,Horizontal,
		StevensonArce
	};

#define GOT_LLX		(1L << 0)
#define GOT_LLY		(1L << 1)
#define GOT_URX		(1L << 2)
#define GOT_URY		(1L << 3)
#define GOT_RWI		(1L << 4)
#define GOT_RHI		(1L << 5)
#define GOT_ANGLE	(1L << 6)
#define GOT_HSIZE	(1L << 7)
#define GOT_VSIZE	(1L << 8)
#define GOT_HSCALE	(1L << 9)
#define GOT_VSCALE	(1L << 10)
#define GOT_SCALE	(1L << 11)
#define GOT_HOFFSET	(1L << 12)
#define GOT_VOFFSET	(1L << 13)
#define GOT_CLIP	(1L << 14)

#define SUFFICIENT_PS_ARGS (GOT_LLX | GOT_LLY | GOT_URX | GOT_URY | GOT_RWI)

struct parse_result
{
	char	iffile[STRSIZE];
	char	psfile[STRSIZE];
	float	hsize;
	float	vsize;
	float	hoffset;
	float	voffset;
	float	scale;
	float	hscale;
	float	vscale;
	float	angle;
	long	hres;
	long	vres;
	long	mode;
	long	bright;
	long	contrast;
	long	gamma;
	long	red;
	long	green;
	long	blue;

	float	llx,lly,urx,ury,rwi,rhi;

	long	gotcontrol;

	long	transfer,
		rendering,
		invert,
		base_dpi,
		threshold,
		patch_colours,
		dither_opt;

	char	psinit_file[STRSIZE],
		psinit_string[STRSIZE];
};

BOOL ParseSpecial(STRPTR OldString,struct parse_result *Result);
