@@ -33,7 +33,7 @@ You can also clear a certain canvas rectangle area:
3333
3434 from ipycanvas import Canvas
3535
36- canvas = Canvas(size = ( 200 , 200 ) )
36+ canvas = Canvas(width = 200 , height = 200 )
3737
3838 canvas.fill_rect(25 , 25 , 100 , 100 )
3939 canvas.clear_rect(45 , 45 , 60 , 60 )
@@ -57,7 +57,7 @@ You can also clear a certain canvas rectangle area:
5757 y = np.array(np.random.rayleigh(250 , n_particles), dtype = np.int32)
5858 size = np.random.randint(1 , 3 , n_particles)
5959
60- canvas = Canvas(size = ( 800 , 500 ) )
60+ canvas = Canvas(width = 800 , height = 500 )
6161
6262 canvas.fill_style = ' green'
6363 canvas.fill_rects(x, y, size)
@@ -82,7 +82,7 @@ There are four methods that draw circles on the canvas:
8282
8383 from ipycanvas import Canvas
8484
85- canvas = Canvas(size = ( 200 , 200 ) )
85+ canvas = Canvas(width = 200 , height = 200 )
8686
8787 canvas.fill_style = ' red'
8888 canvas.stroke_style = ' blue'
@@ -117,7 +117,7 @@ Here are the functions used to perform these steps:
117117
118118 from ipycanvas import Canvas
119119
120- canvas = Canvas(size = ( 100 , 100 ) )
120+ canvas = Canvas(width = 100 , height = 100 )
121121
122122 # Draw simple triangle shape
123123 canvas.begin_path()
@@ -162,7 +162,7 @@ Stroke arcs
162162
163163 from ipycanvas import Canvas
164164
165- canvas = Canvas(size = ( 200 , 200 ) )
165+ canvas = Canvas(width = 200 , height = 200 )
166166
167167 # Draw smiley face
168168 canvas.begin_path()
@@ -186,7 +186,7 @@ Fill bezier curves
186186
187187 from ipycanvas import Canvas
188188
189- canvas = Canvas(size = ( 200 , 200 ) )
189+ canvas = Canvas(width = 200 , height = 200 )
190190
191191 # Cubic curves example
192192 canvas.begin_path()
@@ -211,7 +211,7 @@ Change the fill rule
211211 from math import pi
212212 from ipycanvas import Canvas
213213
214- canvas = Canvas(size = ( 100 , 100 ) )
214+ canvas = Canvas(width = 100 , height = 100 )
215215
216216 canvas.begin_path()
217217 canvas.arc(50 , 50 , 30 , 0 , pi * 2 , True )
@@ -239,7 +239,7 @@ You can also change the global transparency.
239239
240240 from ipycanvas import Canvas
241241
242- canvas = Canvas(size = ( 200 , 200 ) )
242+ canvas = Canvas(width = 200 , height = 200 )
243243
244244 canvas.fill_style = ' red'
245245 canvas.stroke_style = ' blue'
@@ -266,7 +266,7 @@ You can easily draw shadows by tweaking the following attributes:
266266
267267 from ipycanvas import Canvas
268268
269- canvas = Canvas(size = ( 200 , 200 ) )
269+ canvas = Canvas(width = 200 , height = 200 )
270270
271271 canvas.shadow_color = ' green'
272272 canvas.shadow_offset_x = 2
@@ -305,7 +305,7 @@ Sets the width of lines drawn in the future.
305305
306306 from ipycanvas import Canvas
307307
308- canvas = Canvas(size = ( 400 , 280 ) )
308+ canvas = Canvas(width = 400 , height = 280 )
309309 canvas.scale(2 )
310310
311311 for i in range (10 ):
@@ -332,7 +332,7 @@ Sets the appearance of the ends of lines.
332332
333333 from ipycanvas import Canvas
334334
335- canvas = Canvas(size = ( 320 , 360 ) )
335+ canvas = Canvas(width = 320 , height = 360 )
336336
337337 # Possible line_cap values
338338 line_caps = [' butt' , ' round' , ' square' ]
@@ -377,7 +377,7 @@ Sets the appearance of the "corners" where lines meet.
377377
378378 from ipycanvas import Canvas
379379
380- canvas = Canvas(size = ( 320 , 360 ) )
380+ canvas = Canvas(width = 320 , height = 360 )
381381
382382 # Possible line_join values
383383 line_joins = [' round' , ' bevel' , ' miter' ]
@@ -419,7 +419,7 @@ Sets the current line dash pattern.
419419
420420 from ipycanvas import Canvas
421421
422- canvas = Canvas(size = ( 400 , 280 ) )
422+ canvas = Canvas(width = 400 , height = 280 )
423423 canvas.scale(2 )
424424
425425 line_dashes = [
0 commit comments