MCPcopy Create free account
hub / github.com/facebook/chisel / _colorIsCGColorRef

Function _colorIsCGColorRef

commands/FBVisualizationCommands.py:63–77  ·  view source on GitHub ↗
(color)

Source from the content-addressed store, hash-verified

61
62
63def _colorIsCGColorRef(color):
64 color = "(CGColorRef)(" + color + ")"
65
66 result = fb.evaluateExpressionValue(
67 "(unsigned long)CFGetTypeID({color}) == (unsigned long)CGColorGetTypeID()".format(
68 color=color
69 )
70 )
71
72 if result.GetError() is not None and str(result.GetError()) != "success":
73 print("got error: {}".format(result))
74 return False
75 else:
76 isCFColor = result.GetValueAsUnsigned() != 0
77 return isCFColor
78
79
80def _showColor(color):

Callers 2

_showColorFunction · 0.85
_visualizeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected