Render static electrode shapes (independent of actuation state).

        If video is enabled, draw white outline for each electrode (no fill).

        If video is disabled, draw white outline for each electrode and fill
        blue.

        See also :meth:`render_electrode_state_shapes()`.

def render_shapes(self, df_shapes=None, clip=False):
        '''
        Render static electrode shapes (independent of actuation state).

        If video is enabled, draw white outline for each electrode (no fill).

        If video is disabled, draw white outline for each electrode and fill
        blue.

        See also :meth:`render_electrode_state_shapes()`.
        '''
        surface = self.get_surface()
        if df_shapes is None:
            if hasattr(self.canvas, 'df_canvas_shapes'):
                df_shapes = self.canvas.df_canvas_shapes
            else:
                return surface

        cairo_context = cairo.Context(surface)

        for path_id, df_path_i in (df_shapes
                                   .groupby(self.canvas
                                            .shape_i_columns)[['x', 'y']]):
            # Use attribute lookup for `x` and `y`, since it is considerably
            # faster than `get`-based lookup using columns name strings.
            vertices_x = df_path_i.x.values
            vertices_y = df_path_i.y.values
            cairo_context.move_to(vertices_x[0], vertices_y[0])
            for x, y in itertools.izip(vertices_x[1:], vertices_y[1:]):
                cairo_context.line_to(x, y)
            cairo_context.close_path()

            if self.enabled:
                # Video is enabled.

                # Draw white border around electrode.
                line_width = 1
                if path_id not in self.electrode_channels.index:
                    #         on  off on  off
                    dashes = [10, 10]
                    color = (1, 0, 1)
                    line_width *= 2
                else:
                    dashes = []
                    color = (1, 1, 1)
                cairo_context.set_dash(dashes)
                cairo_context.set_line_width(line_width)
                cairo_context.set_source_rgb(*color)
                cairo_context.stroke()
            else:
                # Video is enabled.  Fill electrode blue.
                color = ((0, 0, 1) if path_id in self.electrode_channels.index
                         else (1, 0, 1))
                cairo_context.set_source_rgb(*color)
                cairo_context.fill_preserve()
                # Draw white border around electrode.
                cairo_context.set_line_width(1)
                cairo_context.set_source_rgba(1, 1, 1)
                cairo_context.stroke()
        return surface