def CreateBrushIndirect(ctx,page,i): bgclr = mfpage.color() h,bgclr.r,bgclr.g,bgclr.b = page.cmds[i].args eo = mfpage.mfobj() eo.type = 2 eo.clr = bgclr page.mfobjs[h]=eo print i,'Brush: ',bgclr.r,bgclr.g,bgclr.b,' Handle: ',h
def CreatePalette(ctx, page, i): h, numofclr, data = page.cmds[i].args eo = mfpage.mfobj() eo.type = 4 for j in range(numofclr): clr = mfpage.color() clr.r, clr.g, clr.b = data[j * 4], data[j * 4 + 1], data[j * 4 + 2] page.palette[j] = clr page.mfobjs[h] = eo
def CreatePalette(ctx,page,i): h,numofclr,data = page.cmds[i].args eo = mfpage.mfobj() eo.type = 4 for j in range(numofclr): clr = mfpage.color() clr.r,clr.g,clr.b = data[j*4],data[j*4+1],data[j*4+2] page.palette[j]=clr page.mfobjs[h]=eo
def ExtCreatePen(ctx,page,i): fgclr = mfpage.color() h,fgclr.r,fgclr.g,fgclr.b = page.cmds[i].args eo = mfpage.mfobj() eo.type = 1 eo.clr = fgclr eo.width = 5. ## what is default? page.mfobjs[h]=eo print i,'ExtPen: ',fgclr.r,fgclr.g,fgclr.b,' Handle: ',h
def CreatePen(ctx,page,i): fgclr = mfpage.color() h,fgclr.r,fgclr.g,fgclr.b,width = page.cmds[i].args eo = mfpage.mfobj() eo.type = 1 eo.clr = fgclr eo.width = width page.mfobjs[h]=eo print i,'Pen: ',fgclr.r,fgclr.g,fgclr.b,' Handle: ',h
def CreateBrushIndirect(ctx, page, i): bgclr = mfpage.color() h, bgclr.r, bgclr.g, bgclr.b, flag, lbStyle, lbHatch = page.cmds[i].args eo = mfpage.mfobj() eo.type = 2 eo.clr = bgclr eo.style = lbStyle eo.hatch = lbHatch eo.flag = flag page.mfobjs[h] = eo
def CreatePen(ctx, page, i): fgclr = mfpage.color() h, fgclr.r, fgclr.g, fgclr.b, flag, width, style = page.cmds[i].args eo = mfpage.mfobj() eo.type = 1 eo.clr = fgclr eo.width = width eo.style = style eo.flag = flag page.mfobjs[h] = eo
def CreateBrushIndirect(ctx,page,i): bgclr = mfpage.color() h,bgclr.r,bgclr.g,bgclr.b,flag,lbStyle,lbHatch = page.cmds[i].args eo = mfpage.mfobj() eo.type = 2 eo.clr = bgclr eo.style = lbStyle eo.hatch = lbHatch eo.flag = flag page.mfobjs[h]=eo
def CreatePen(ctx,page,i): fgclr = mfpage.color() h,fgclr.r,fgclr.g,fgclr.b,flag,width,style = page.cmds[i].args eo = mfpage.mfobj() eo.type = 1 eo.clr = fgclr eo.width = width eo.style = style eo.flag = flag page.mfobjs[h]=eo