You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/api.rst
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ There are some API differences though:
7
7
8
8
- The Canvas widget is directly exposing the `CanvasRenderingContext2D <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D>`_ API
9
9
- All the API is written in *snake_case* instead of *camelCase*, so for example ``canvas.fillStyle = 'red'`` in JavaScript becomes ``canvas.fill_style = 'red'`` in Python
10
-
- The Canvas widget exposes a ``clear`` method, ``canvas.clear()`` is a shortcut for ``canvas.clear_rect(0, 0, canvas.size[0], canvas.size[1])``
10
+
- The Canvas widget exposes a ``clear`` method, ``canvas.clear()`` is a shortcut for ``canvas.clear_rect(0, 0, canvas.width, canvas.height)``
11
11
- We provide a `hold_canvas` context manager if you want to perform lots of commands at once
12
12
- The Web canvas putImageData method does not support transparency and the current transformation state, our ``Canvas.put_image_data`` does support them!
0 commit comments