예제 #1
0
 def update(self):
     if isinstance(self.color, str):
         try:
             self.color = cms.hexcolor_to_rgba(self.color)
         except:
             self.color = cms.hexcolor_to_rgba(self.config.layer_color)
     stroke = self.style[1]
     if stroke:
         stroke[2] = [uc2const.COLOR_RGB, self.color, 1.0, '']
예제 #2
0
파일: model.py 프로젝트: Scrik/sk1-wx
	def update(self):
		if isinstance(self.color, str):
			try:
				self.color = cms.hexcolor_to_rgba(self.color)
			except:
				self.color = cms.hexcolor_to_rgba(self.config.layer_color)
		stroke = self.style[1]
		if stroke:
			stroke[2] = [uc2const.COLOR_RGB , self.color, 1.0, '']
예제 #3
0
	def update(self):
		if isinstance(self.color, str):
			try:
				self.color = cms.hexcolor_to_rgba(self.color)
			except:
				self.color = cms.hexcolor_to_rgba(self.config.layer_color)
		stroke = self.style[1]
		if stroke:
			stroke[2] = [uc2const.COLOR_RGB , self.color[:3], self.color[3], '']
		if len(self.properties) == 3: self.properties += [1, ]
예제 #4
0
 def on_hex_change(self):
     hexcolor = self.html.get_color()
     if len(hexcolor) == 7:
         self.color[1] = cms.hexcolor_to_rgb(hexcolor)
         self.color[2] = 1.0
     elif len(hexcolor) == 9:
         r, g, b, a = cms.hexcolor_to_rgba(hexcolor)
         self.color[1] = [r, g, b]
         self.color[2] = a
     if self.callback: self.callback()
     else: self.update()
예제 #5
0
파일: colorctrls.py 프로젝트: Scrik/sk1-wx
	def on_hex_change(self):
		hexcolor = self.html.get_color()
		if len(hexcolor) == 7:
			self.color[1] = cms.hexcolor_to_rgb(hexcolor)
			self.color[2] = 1.0
		elif len(hexcolor) == 9:
			r, g, b, a = cms.hexcolor_to_rgba(hexcolor)
			self.color[1] = [r, g, b]
			self.color[2] = a
		if self.callback: self.callback()
		else: self.update()