/*
** MUDoc_Embed.h
*/

#ifndef __MUDOC_EMBED_INCLUDED
#define __MUDOC_EMBED_INCLUDED

#include <mupdf/pdf.h>
#include "xTcl_util.h"


struct embedParams {
 	double zoom;
 	double angle;
 	int over ;
	fz_rect crop;
	fz_point to;
    int has_to;
	char anchor[3]; // fixed array max 2 chars plus \0
};

int _parseEmbedPageOptions( Tcl_Interp *interp, int objc, Tcl_Obj* const objv[], struct embedParams *param );

TclResCode mu_embed_xobj(Tcl_Interp* interp,
	fz_context* ctx,
	pdf_document* doc,
	pdf_page *toPage,   // where to embed xobj
	pdf_obj *xobj,
	struct embedParams *param
	);

#endif //  __MUDOC_EMBED_INCLUDED
