code: def __init__(self):
      app.Canvas.__init__(self, keys="interactive", size=(800, 800))
      global pos
      self.visuals = []
      polygon = visuals.PolygonVisual(
          pos=pos,
          color=(0.8, 0.2, 0, 1),
          border_color=(1, 1, 1, 1),
          border_width=3,
      )
      polygon.transform = transforms.STTransform(
          scale=(200, 200), translate=(600, 600)
      )
      self.visuals.append(polygon)
  
      ellipse = visuals.EllipseVisual(
          center=(0, 0, 0),
          radius=(100, 150),
          color=(0.2, 0.2, 0.8, 1),
          border_color=(1, 1, 1, 1),
          border_width=3,
          start_angle=180.0,
          span_angle=150.0,
      )
      ellipse.transform = transforms.STTransform(
          scale=(0.9, 1.5), translate=(200, 300)
      )
      self.visuals.append(ellipse)
  
      rect = visuals.RectangleVisual(
          center=(600, 200, 0),
          height=200.0,
          width=300.0,
          radius=[30.0, 30.0, 0.0, 0.0],
          color=(0.5, 0.5, 0.2, 1),
          border_width=3,
          border_color="white",
      )
      rect.transform = transforms.NullTransform()
      self.visuals.append(rect)
  
      rpolygon = visuals.RegularPolygonVisual(
          center=(200.0, 600.0, 0),
          radius=160,
          color=(0.2, 0.8, 0.2, 1),
          border_color=(1, 1, 1, 1),
          border_width=3,
          sides=6,
      )
      rpolygon.transform = transforms.NullTransform()
      self.visuals.append(rpolygon)
  
      self.show()
  
file_path: vispy/examples/basics/visuals/polygon_visual.py
imports: import sys
  import numpy
  from vispy import app, gloo, visuals
  from vispy.visuals import transforms
label_desc: Use image node_id 1 to create a new Canvas object from inherited base classes: app with example: obj = Canvas()