code: def test_rectpolygon_draw():
      """Test drawing transformed rectpolygons using RectPolygonVisual"""
      with TestingCanvas() as c:
          rectpolygon = visuals.Rectangle(
              center=(0.0, 0.0),
              height=20.0,
              width=20.0,
              radius=10.0,
              color="blue",
              parent=c.scene,
          )
          rectpolygon.transform = transforms.STTransform(
              scale=(2.0, 3.0), translate=(50, 50)
          )
  
          assert_image_approved(c.render(), "visuals/rectpolygon6.png")
  
          rectpolygon.parent = None
          rectpolygon = visuals.Rectangle(
              center=(0.0, 0.0),
              height=20.0,
              width=20.0,
              radius=10.0,
              color="blue",
              border_color="red",
              parent=c.scene,
          )
          rectpolygon.transform = transforms.STTransform(
              scale=(2.0, 3.0), translate=(50, 50)
          )
  
          assert_image_approved(c.render(), "visuals/rectpolygon7.png")
  
          rectpolygon.parent = None
          rectpolygon = visuals.Rectangle(
              center=(0.0, 0.0),
              height=60.0,
              width=60.0,
              radius=10.0,
              border_color="red",
              parent=c.scene,
          )
          rectpolygon.transform = transforms.STTransform(
              scale=(1.5, 0.5), translate=(50, 50)
          )
  
          assert_image_approved(
              c.render(), "visuals/rectpolygon8.png", min_corr=0.5
          )
  
          rectpolygon.parent = None
          rectpolygon = visuals.Rectangle(
              center=(0.0, 0.0),
              height=60.0,
              width=60.0,
              radius=[25, 10, 0, 15],
              color="blue",
              border_color="red",
              parent=c.scene,
          )
          rectpolygon.transform = transforms.STTransform(
              scale=(1.5, 0.5), translate=(50, 50)
          )
  
          assert_image_approved(c.render(), "visuals/rectpolygon9.png")
  
imports: from vispy.scene import visuals, transforms
  from vispy.testing import requires_application, TestingCanvas, run_tests_if_main, raises
  from vispy.testing.image_tester import assert_image_approved
label_desc: Use image node_id 2 for calling a global function with example usage: test_rectpolygon_draw() without return types