コード例 #1
0
ファイル: call.py プロジェクト: JsAaron/cdr
def paletteTest1():
    cdrObj = CDR()
    paletteObj = cdrObj.accessPalette('my')
    cdrObj.setPletteEnabled(paletteObj)  #启用
    # 创建一个颜色对象,使用指定格式
    color = cdrObj.createColorObj([110, 128, 255], 'unique_key', 'RGB')
    # 把颜色增加到调色板上
    cdrObj.addPletteColor(paletteObj, color)
コード例 #2
0
ファイル: call.py プロジェクト: JsAaron/cdr
def paletteTest2():
    cdrObj = CDR()
    paletteObj = cdrObj.accessPalette('my')
    newColor = cdrObj.createColorObj([0, 255, 255], 'unique_key', 'RGB')
    cdrObj.replacePletteColorByName(paletteObj, newColor)