Ejemplo n.º 1
0
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
Ejemplo n.º 2
0
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
Ejemplo n.º 3
0
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
Ejemplo n.º 4
0
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
Ejemplo n.º 5
0
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
Ejemplo n.º 6
0
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
Ejemplo n.º 7
0
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
Ejemplo n.º 8
0
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
Ejemplo n.º 9
0
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