def stroke(r=None, g=None, b=None, a=1): # Set the stroke color as RGB value. global currentStrokeColor if r is None: currentStrokeColor = None elif g is None: currentStrokeColor = NSColor.colorWithDeviceWhite_alpha_(r, a) else: currentStrokeColor = NSColor.colorWithDeviceRed_green_blue_alpha_(r, g, b, a)
def stroke(r=None, g=None, b=None, a=1): # Set the stroke color as RGB value. global currentStrokeColor if r is None: currentStrokeColor = None elif g is None: currentStrokeColor = NSColor.colorWithDeviceWhite_alpha_(r, a) else: currentStrokeColor = NSColor.colorWithDeviceRed_green_blue_alpha_( r, g, b, a)
def fill(r=None, g=None, b=None, a=1): # Set the fill color as RGB value. global currentFillColor global currentGradient if r is None: currentFillColor = None elif g is None: currentFillColor = NSColor.colorWithDeviceWhite_alpha_(r, a) currentGradient = None else: currentFillColor = NSColor.colorWithDeviceRed_green_blue_alpha_(r, g, b, a) currentGradient = None
def fill(r=None, g=None, b=None, a=1): # Set the fill color as RGB value. global currentFillColor global currentGradient if r is None: currentFillColor = None elif g is None: currentFillColor = NSColor.colorWithDeviceWhite_alpha_(r, a) currentGradient = None else: currentFillColor = NSColor.colorWithDeviceRed_green_blue_alpha_( r, g, b, a) currentGradient = None