Skip to main content
`Ctrl`+`K`

# vispy.visuals.collections.agg_fast_path_collection module

Antigrain Geometry Fast Path Collection

This collection provides antialiased and accurate paths with caps and miter joins. It consume x4 more memory than regular lines and is a bit slower, but the quality of the output is worth the cost. Note that no control can be made on miter joins which may result in some glitches on screen.

class vispy.visuals.collections.agg_fast_path_collection.AggFastPathCollection(user_dtype=None, transform=None, vertex=None, fragment=None, **kwargs)

  Bases: `Collection`

  Antigrain Geometry Fast Path Collection

  This collection provides antialiased and accurate paths with caps and miter joins. It consume x4 more memory than regular lines and is a bit slower, but the quality of the output is worth the cost. Note that no control can be made on miter joins which may result in some glitches on screen.

  append(P, closed=False, itemsize=None, **kwargs)

    Append a new set of vertices to the collection.

    For kwargs argument, n is the number of vertices (local) or the number of item (shared)

    Parameters:
      P np.array

        Vertices positions of the path(s) to be added

      closed: bool

        Whether path(s) is/are closed

      itemsize: int or None

        Size of an individual path

      caps list, array or 2-tuple

        Path start /end cap

      color list, array or 4-tuple

        Path color

      linewidth list, array or float

        Path linewidth

      antialias list, array or float

        Path antialias area

  bake(P, key='curr', closed=False, itemsize=None)

    Given a path P, return the baked vertices as they should be copied in the collection if the path has already been appended.

    Examples

        >>> paths.append(P)
        >>> P *= 2
        >>> paths['prev'][0] = bake(P,'prev')
        >>> paths['curr'][0] = bake(P,'curr')
        >>> paths['next'][0] = bake(P,'next')

  draw(mode='triangle_strip')

    Draw collection