int SimpleDrawClipboardEMF(void) { if (contextplus) cdUseContextPlus(1); DrawCanvasDriverSizeParam(CD_CLIPBOARD, ""); if (contextplus) cdUseContextPlus(0); return 0; }
int SimpleDrawPrintDialog(void) { if (contextplus) cdUseContextPlus(1); DrawCanvasDriver(CD_PRINTER, "simple -d"); /* show dialog */ if (contextplus) cdUseContextPlus(0); return 0; }
int SimpleDrawPrint(void) { if (contextplus) cdUseContextPlus(1); DrawCanvasDriver(CD_PRINTER, "simple print"); if (contextplus) cdUseContextPlus(0); return 0; }
int SimpleDrawEMF(void) { if (contextplus) cdUseContextPlus(1); DrawCanvasDriverSize(CD_EMF, "simple.emf", 1); if (contextplus) cdUseContextPlus(0); return 0; }
void SimpleCreateCanvasWindow(void) { /* creates the canvas based in an existing window */ if (contextplus) cdUseContextPlus(1); winCanvas = cdCreateCanvas(CD_IUP, winData); if (contextplus) cdUseContextPlus(0); curCanvas = winCanvas; }
int SimpleDrawImageRGB(void) { use_opengl = 0; if (dbCanvas) cdKillCanvas(dbCanvas); if (contextplus) cdUseContextPlus(1); dbCanvas = cdCreateCanvas(CD_DBUFFERRGB, winCanvas); if (contextplus) cdUseContextPlus(0); curCanvas = dbCanvas; SimpleDraw(curCanvas); return 0; }
virtual void mapped_() { L("Canvas mapped"); cdInitContextPlus(); cdUseContextPlus(1); canvas_ = cdCreateCanvas(CD_IUP, *this); cdCanvasForeground(canvas_, CD_BLUE); cdCanvasSetAttribute(canvas_, "ANTIALIAS", "0"); //cdUseContextPlus(0); }
cdContext* cdContextImage(void) { if (cdUseContextPlus(CD_QUERY)) { cdContext* ctx = cdGetContextPlus(CD_CTXPLUS_IMAGE); if (ctx != NULL) return ctx; } return &cdImageContext; }
cdContext* cdContextPrinter(void) { if (cdUseContextPlus(CD_QUERY)) { cdContext* ctx = cdGetContextPlus(CD_CTX_PRINTER); if (ctx != NULL) return ctx; } return &cdPrinterContext; }
cdContext* cdContextNativeWindow(void) { if (cdUseContextPlus(CD_QUERY)) { cdContext* ctx = cdGetContextPlus(CD_CTXPLUS_NATIVEWINDOW); if (ctx != NULL) return ctx; } return &cdNativeWindowContext; }
cdContext* cdContextDBuffer(void) { if (cdUseContextPlus(CD_QUERY)) { cdContext* ctx = cdGetContextPlus(CD_CTXPLUS_DBUFFER); if (ctx != NULL) return ctx; } return &cdDBufferContext; }
cdContext* cdContextEMF(void) { if (cdUseContextPlus(CD_QUERY)) { cdContext* ctx = cdGetContextPlus(CD_CTXPLUS_EMF); if (ctx != NULL) return ctx; } return &cdEMFContext; }
cdContext* cdContextClipboard(void) { if (cdUseContextPlus(CD_QUERY)) { cdContext* ctx = cdGetContextPlus(CD_CTXPLUS_CLIPBOARD); if (ctx != NULL) return ctx; } return &cdClipboardContext; }
static void cdlua_usecontextplus(void) { int use = (int)luaL_check_number(1); int L_result = cdUseContextPlus(use); lua_pushnumber(L_result); }