class_docstr: A collection is a container for several items having the same data
  structure (dtype). Each data type can be declared as local (it is specific
  to a vertex), shared (it is shared among item vertices) or global (it is
  shared by all items). It is based on the BaseCollection but offers a more
  intuitive interface.
  
  Parameters
  ----------
  dtype: list
      Data individual types as (name, dtype, scope, default)
  
  itype: np.dtype or None
      Indices data type
  
  mode : GL_ENUM
      GL_POINTS, GL_LINES, GL_LINE_STRIP, GL_LINE_LOOP,
      GL_TRIANGLES, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN
  
  vertex: str or tuple of str
     Vertex shader to use to draw this collection
  
  fragment:  str or tuple of str
     Fragment shader to use to draw this collection
  
  kwargs: str
      Scope can also be specified using keyword argument,
      where parameter name must be one of the dtype.
class_docstr_tok: ["A","collection","is","a","container","for","several","items","having","the","same","data","structure","(","dtype",")",".","Each","data","type","can","be","declared","as","local","(","it","is","specific","to","a","vertex",")",",","shared","(","it","is","shared","among","item","vertices",")","or","global","(","it","is","shared","by","all","items",")",".","It","is","based","on","the","BaseCollection","but","offers","a","more","intuitive","interface",".","Parameters","--","--","--","--","--","dtype",":","list","Data","individual","types","as","(","name",",","dtype",",","scope",",","default",")","itype",":","np.dtype","or","None","Indices","data","type","mode",":","GL_ENUM","GL_POINTS",",","GL_LINES",",","GL_LINE_STRIP",",","GL_LINE_LOOP",",","GL_TRIANGLES",",","GL_TRIANGLE_STRIP",",","GL_TRIANGLE_FAN","vertex",":","str","or","tuple","of","str","Vertex","shader","to","use","to","draw","this","collection","fragment",":","str","or","tuple","of","str","Fragment","shader","to","use","to","draw","this","collection","kwargs",":","str","Scope","can","also","be","specified","using","keyword","argument",",","where","parameter","name","must","be","one","of","the","dtype","."]
docstr: Return a view on the collection using provided transform
docstr_tok: ["Return","a","view","on","the","collection","using","provided","transform"]
code: def view(self, transform, viewport=None):
      """Return a view on the collection using provided transform"""
      return CollectionView(self, transform, viewport)
  
file_path: vispy/vispy/visuals/collections/collection.py
imports: import numpy
  from ...None import gloo
  from .util import fetchcode
  from .base_collection import BaseCollection
  from ..shaders import ModularProgram
  from ...util.event import EventEmitter
label_desc: Use image node_id 2 for calling the Collection obj's underlying member method code with example usage: obj.view(transform, viewport) and returns: CollectionView