示例#1
0
 def activate(self, cms, orig_fill, new_color):
     fill = None
     if orig_fill and orig_fill[1] == sk2const.FILL_SOLID:
         fill = orig_fill
     if not new_color and fill:
         new_color = color_to_spot(fill[2])
     elif not new_color and not fill:
         new_color = get_registration_black()
     else:
         new_color = color_to_spot(new_color)
     if not new_color[3]:
         new_color[3] = rgb_to_hexcolor(cms.get_rgb_color(new_color)[1])
     SolidFillPanel.activate(self, cms, orig_fill, new_color)
     self.update()
示例#2
0
文件: fillctrls.py 项目: Scrik/sk1-wx
	def activate(self, cms, orig_fill, new_color):
		fill = None
		if orig_fill and orig_fill[1] == sk2_const.FILL_SOLID:
			fill = orig_fill
		if not new_color and fill:
			new_color = color_to_spot(fill[2])
		elif not new_color and not fill:
			new_color = get_registration_black()
		else:
			new_color = color_to_spot(new_color)
		if not new_color[3]:
			new_color[3] = rgb_to_hexcolor(cms.get_rgb_color(new_color)[1])
		SolidFillPanel.activate(self, cms, orig_fill, new_color)
		self.update()
示例#3
0
def parse_jcw_color(cs, data):
    color = CS_MAP[cs](data) if cs in CS_MAP else []
    return cms.color_to_spot(color) if cs in SPOT_CS else color