def __init__(self, childproperties, defaults, config, colorscheme_path=None): properties = { 'colorscheme': (StringProperty, {}), 'fillColor': (ColorProperty, {}), 'strokeColor': (ColorProperty, {}), 'connectionColor': (ColorProperty, {}), 'fontColor': (ColorProperty, {}), 'fontColorAuto': (BooleanProperty, {}), 'fontColorAutoDark': (ColorProperty, {}), 'fontColorAutoLight': (ColorProperty, {}), 'fontColorAutoThreshold': (NumberProperty, {'min': 0.0}) } colorscheme_properties = { 'backgroundColor': (ColorProperty, {}), 'rootColor': (ColorProperty, {}), 'nodeColors': (ArrayProperty, {'type': ColorProperty}) } properties.update(childproperties) self._props = Properties(properties, self._defaults_path(defaults), config) E = self._eval_func() if not colorscheme_path: colorscheme_path = E('colorscheme') colorscheme = loadconfig(colors_path(colorscheme_path), flat=True) self._colorscheme_props = Properties(colorscheme_properties, 'colorizer/colorscheme', colorscheme)
def __init__(self, config): properties = { 'horizontalBalance': (NumberProperty, {}), 'verticalAlignFactor': (NumberProperty, { 'min': 0.0, 'max': 1.0 }), 'rootPadX': (NumberProperty, {}), 'nodePadX': (NumberProperty, {}), 'nodePadY': (NumberProperty, {}), 'branchPadY': (NumberProperty, {}), 'sameWidthSiblings': (BooleanProperty, {}), 'snapParentToChildren': (BooleanProperty, {}), 'snapToHalfPositions': (BooleanProperty, {}), 'radialMinNodes': (NumberProperty, { 'min': 0.0 }), 'radialFactor': (NumberProperty, {}) } self._props = Properties(properties, self._defaults_path('layout'), config) self._leftnodes = () self._rightnodes = ()
def __init__(self, childproperties, defaults, config): align = ('auto', 'left', 'right', 'center', 'justify') anchor = ('auto', 'center') properties = { 'fontName': (StringProperty, {}), 'fontSize': (NumberProperty, { 'min': 0.0 }), 'lineHeight': (NumberProperty, { 'min': 0.0 }), 'textAlign': (EnumProperty, { 'values': align }), 'justifyMinLines': (NumberProperty, { 'min': 0.0 }), 'textBaselineCorrection': (NumberProperty, {}), 'maxTextWidth': (NumberProperty, { 'min': 0.0 }), 'hyphenate': (BooleanProperty, {}), 'textPadX': (NumberProperty, { 'min': 0.0 }), 'textPadY': (NumberProperty, { 'min': 0.0 }), 'strokeWidth': (NumberProperty, { 'min': 0.0 }), 'nodeDrawShadow': (BooleanProperty, {}), 'nodeShadowColor': (ColorProperty, {}), 'nodeShadowBlur': (NumberProperty, { 'min': 0.0 }), 'nodeShadowOffsX': (NumberProperty, {}), 'nodeShadowOffsY': (NumberProperty, {}), 'textDrawShadow': (BooleanProperty, {}), 'textShadowColor': (ColorProperty, {}), 'textShadowOffsX': (NumberProperty, {}), 'textShadowOffsY': (NumberProperty, {}), 'drawGradient': (BooleanProperty, {}), 'gradientTopColor': (ColorProperty, {}), 'gradientBottomColor': (ColorProperty, {}), 'connectionAnchorPoint': (EnumProperty, { 'values': anchor }) } properties.update(childproperties) self._props = Properties(properties, self._defaults_path(defaults), config) self._wraprect = True
def __init__(self, config={}): properties = { 'nodeLineWidthStart': (NumberProperty, { 'min': 0.0 }), 'nodeLineWidthEnd': (NumberProperty, { 'min': 0.0 }), 'nodeCx1Factor': (NumberProperty, {}), 'nodeCx2Factor': (NumberProperty, {}), 'nodeCy1Factor': (NumberProperty, {}), 'nodeCy2Factor': (NumberProperty, {}) } self._props = Properties(properties, defaults_path('curve'), config)
def __init__(self, config={}): corner_styles = ('square', 'beveled', 'rounded') junction_styles = ('none', 'square', 'disc', 'diamond') junction_sign = ('none', 'plus', 'minus') properties = { 'lineWidth': (NumberProperty, { 'min': 0.0 }), 'junctionXFactor': (NumberProperty, {}), 'cornerStyle': (EnumProperty, { 'values': corner_styles }), 'cornerRadius': (NumberProperty, { 'min': 0.0 }), 'cornerPad': (NumberProperty, { 'min': 0.0 }), 'junctionStyle': (EnumProperty, { 'values': junction_styles }), 'junctionRadius': (NumberProperty, { 'min': 0.0 }), 'junctionFillColor': (ColorProperty, {}), 'junctionStrokeWidth': (NumberProperty, { 'min': 0.0 }), 'junctionStrokeColor': (ColorProperty, {}), 'junctionSign': (EnumProperty, { 'values': junction_sign }), 'junctionSignSize': (NumberProperty, { 'min': 0.0 }), 'junctionSignStrokeWidth': (NumberProperty, { 'min': 0.0 }), 'junctionSignColor': (ColorProperty, {}) } self._props = Properties(properties, defaults_path('junction'), config)