How to use the ipycanvas.utils.to_camel_case function in ipycanvas

To help you get started, we’ve selected a few ipycanvas examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github martinRenou / ipycanvas / ipycanvas / canvas.py View on Github external
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)