コード例 #1
0
ファイル: drawingTools.py プロジェクト: pobivan/GlyphsSDK
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)
コード例 #2
0
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)
コード例 #3
0
ファイル: drawingTools.py プロジェクト: pobivan/GlyphsSDK
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
コード例 #4
0
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