示例#1
0
int SimpleDrawClipboardEMF(void)
{
  if (contextplus) cdUseContextPlus(1);
  DrawCanvasDriverSizeParam(CD_CLIPBOARD, "");
  if (contextplus) cdUseContextPlus(0);
  return 0;
}
示例#2
0
int SimpleDrawPrintDialog(void)
{
  if (contextplus) cdUseContextPlus(1);
  DrawCanvasDriver(CD_PRINTER, "simple -d");   /* show dialog */
  if (contextplus) cdUseContextPlus(0);
  return 0;
}
示例#3
0
int SimpleDrawPrint(void)
{
  if (contextplus) cdUseContextPlus(1);
  DrawCanvasDriver(CD_PRINTER, "simple print");
  if (contextplus) cdUseContextPlus(0);
  return 0;
}
示例#4
0
int SimpleDrawEMF(void)
{
  if (contextplus) cdUseContextPlus(1);
  DrawCanvasDriverSize(CD_EMF, "simple.emf", 1);
  if (contextplus) cdUseContextPlus(0);
  return 0;
}
示例#5
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;
}
示例#6
0
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;
}
示例#7
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);
 }
示例#8
0
文件: cdwimg.c 项目: LuaDist/cd
cdContext* cdContextImage(void)
{
  if (cdUseContextPlus(CD_QUERY))
  {
    cdContext* ctx = cdGetContextPlus(CD_CTXPLUS_IMAGE);
    if (ctx != NULL)
      return ctx;
  }

  return &cdImageContext;
}
示例#9
0
cdContext* cdContextPrinter(void)
{
  if (cdUseContextPlus(CD_QUERY))
  {
    cdContext* ctx = cdGetContextPlus(CD_CTX_PRINTER);
    if (ctx != NULL)
      return ctx;
  }

  return &cdPrinterContext;
}
示例#10
0
文件: cdxnative.c 项目: LuaDist/cd
cdContext* cdContextNativeWindow(void)
{
  if (cdUseContextPlus(CD_QUERY))
  {
    cdContext* ctx = cdGetContextPlus(CD_CTXPLUS_NATIVEWINDOW);
    if (ctx != NULL)
      return ctx;
  }

  return &cdNativeWindowContext;
}
示例#11
0
文件: cdgdkdbuf.c 项目: kmx/mirror-cd
cdContext* cdContextDBuffer(void)
{
  if (cdUseContextPlus(CD_QUERY))
  {
    cdContext* ctx = cdGetContextPlus(CD_CTXPLUS_DBUFFER);
    if (ctx != NULL)
      return ctx;
  }

  return &cdDBufferContext;
}
示例#12
0
文件: cdwemf.c 项目: LuaDist/cd
cdContext* cdContextEMF(void)
{
  if (cdUseContextPlus(CD_QUERY))
  {
    cdContext* ctx = cdGetContextPlus(CD_CTXPLUS_EMF);
    if (ctx != NULL)
      return ctx;
  }

  return &cdEMFContext;
}
示例#13
0
文件: cdwclp.c 项目: LuaDist/cd
cdContext* cdContextClipboard(void)
{
  if (cdUseContextPlus(CD_QUERY))
  {
    cdContext* ctx = cdGetContextPlus(CD_CTXPLUS_CLIPBOARD);
    if (ctx != NULL)
      return ctx;
  }

  return &cdClipboardContext;
}
示例#14
0
static void cdlua_usecontextplus(void)
{
    int use = (int)luaL_check_number(1);
    int L_result = cdUseContextPlus(use);
    lua_pushnumber(L_result);
}