/*
** MUDoc_Embed.h
*/

#ifndef __MUDOC_EMBED_INCLUDED
#define __MUDOC_EMBED_INCLUDED

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

struct embedParams {
 	double zoom;
 	double rotate;
 	int over ;
	fz_rect crop;
	fz_point to;
    int has_to;
};

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,
	fz_point toCenter, 
	fz_rect fromRect,
	double zoom,
	double angle,
	int overlay
    );
    
#endif //  __MUDOC_EMBED_INCLUDED
