Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __setattr__(self, name, value):
super(Canvas, self).__setattr__(name, value)
canvas_attrs = ['fill_style', 'stroke_style', 'global_alpha', 'font', 'text_align',
'text_baseline', 'direction', 'global_composite_operation',
'line_width', 'line_cap', 'line_join', 'miter_limit', 'line_dash_offset',
'shadow_offset_x', 'shadow_offset_y', 'shadow_blur', 'shadow_color']
if name in canvas_attrs:
command = {
'name': 'set',
'attr': to_camel_case(name),
'value': value
}
self._send_command(command)