def cmykShadow(self, offset, blur, color): if offset is None: self._state.shadow = None return rgbColor = cmyk2rgb(color[0], color[1], color[2], color[3]) self._state.shadow = self._shadowClass(offset, blur, rgbColor) self._state.shadow.cmykColor = self._cmykColorClass(*color)
def cmykFill(self, c , m, y, k, a=1): if c is None: self.fill(None) else: self._state.cmykFillColor = self._cmykColorClass(c, m, y, k, a) r, g, b = cmyk2rgb(c, m, y, k) self.fill(r, g, b, a)
def cmykStroke(self, c , m, y, k, a=1): if c is None: self.stroke(None) else: self._state.cmykStrokeColor = self._cmykColorClass(c, m, y, k, a) r, g, b = cmyk2rgb(c, m, y, k) self.stroke(r, g, b, a)
def cmykStroke(self, c, m, y, k, a=1): if c is None: self.stroke(None) else: self._state.cmykStrokeColor = self._cmykColorClass(c, m, y, k, a) r, g, b = cmyk2rgb(c, m, y, k) self.stroke(r, g, b, a)
def cmykFill(self, c, m, y, k, a=1): if c is None: self.fill(None) else: self._state.cmykFillColor = self._cmykColorClass(c, m, y, k, a) r, g, b = cmyk2rgb(c, m, y, k) self.fill(r, g, b, a)
def cmykRadialGradient(self, startPoint=None, endPoint=None, colors=None, locations=None, startRadius=0, endRadius=100): if startPoint is None: self._state.gradient = None return rgbColors = [cmyk2rgb(color[0], color[1], color[2], color[3]) for color in colors] self._state.gradient = self._gradientClass("radial", startPoint, endPoint, rgbColors, locations, startRadius, endRadius) self._state.gradient.cmykColors = [self._cmykColorClass(*color) for color in colors] self.fill(None)
def cmykLinearGradient(self, startPoint=None, endPoint=None, colors=None, locations=None): if startPoint is None: self._state.gradient = None return rgbColors = [cmyk2rgb(color[0], color[1], color[2], color[3]) for color in colors] self._state.gradient = self._gradientClass("linear", startPoint, endPoint, rgbColors, locations) self._state.gradient.cmykColors = [self._cmykColorClass(*color) for color in colors] self.fill(None)
def cmykLinearGradient(self, startPoint=None, endPoint=None, colors=None, locations=None): if startPoint is None: self._state.gradient = None self.fill(0) return rgbColors = [ cmyk2rgb(color[0], color[1], color[2], color[3]) for color in colors ] self._state.gradient = self._gradientClass("linear", startPoint, endPoint, rgbColors, locations) self._state.gradient.cmykColors = [ self._cmykColorClass(*color) for color in colors ] self.fill(None)
def cmykRadialGradient(self, startPoint=None, endPoint=None, colors=None, locations=None, startRadius=0, endRadius=100): if startPoint is None: self._state.gradient = None self.fill(0) return rgbColors = [ cmyk2rgb(color[0], color[1], color[2], color[3]) for color in colors ] self._state.gradient = self._gradientClass("radial", startPoint, endPoint, rgbColors, locations, startRadius, endRadius) self._state.gradient.cmykColors = [ self._cmykColorClass(*color) for color in colors ] self.fill(None)