@requires_application()
def test_reactive_draw():
 with TestingCanvas() as c:
  rpolygon = visuals.RegularPolygon(center=[50, 50, 0.0], radius=20, sides=8, color='yellow', parent=c.scene)
  rpolygon.center = [70, 40, 0.0]
  assert_image_approved(c.render(), 'visuals/reactive_regular_polygon1.png')
  rpolygon.radius = 25
  assert_image_approved(c.render(), 'visuals/reactive_regular_polygon2.png')
  rpolygon.color = 'red'
  assert_image_approved(c.render(), 'visuals/reactive_regular_polygon3.png')
  rpolygon.border_color = 'yellow'
  assert_image_approved(c.render(), 'visuals/reactive_regular_polygon4.png')
  rpolygon.sides = 6
  assert_image_approved(c.render(), 'visuals/reactive_regular_polygon5.png')

@ requires_application ( ) def test_reactive_draw ( ) : with TestingCanvas ( ) as c : rpolygon = visuals . RegularPolygon ( center = [ 50 , 50 , 0.0 ] , radius = 20 , sides = 8 , color = 'yellow' , parent = c . scene ) rpolygon . center = [ 70 , 40 , 0.0 ] assert_image_approved ( c . render ( ) , 'visuals/reactive_regular_polygon1.png' ) rpolygon . radius = 25 assert_image_approved ( c . render ( ) , 'visuals/reactive_regular_polygon2.png' ) rpolygon . color = 'red' assert_image_approved ( c . render ( ) , 'visuals/reactive_regular_polygon3.png' ) rpolygon . border_color = 'yellow' assert_image_approved ( c . render ( ) , 'visuals/reactive_regular_polygon4.png' ) rpolygon . sides = 6 assert_image_approved ( c . render ( ) , 'visuals/reactive_regular_polygon5.png' )
test reactive regular polygon attributes .