def _get_contours(self):
<EOL>contours = []<EOL>current_contour = None<EOL>empty = True<EOL>for i, el in enumerate(self._get_elements()):<EOL><INDENT>if el.cmd == MOVETO:<EOL><INDENT>if not empty:<EOL><INDENT>contours.append(current_contour)<EOL><DEDENT>current_contour = BezierPath(self._bot)<EOL>current_contour.moveto(el.x, el.y)<EOL>empty = True<EOL><DEDENT>elif el.cmd == LINETO:<EOL><INDENT>empty = False<EOL>current_contour.lineto(el.x, el.y)<EOL><DEDENT>elif el.cmd == CURVETO:<EOL><INDENT>empty = False<EOL>current_contour.curveto(el.c1x, el.c1y, el.c2x, el.c2y, el.x, el.y)<EOL><DEDENT>elif el.cmd == CLOSE:<EOL><INDENT>current_contour.closepath()<EOL><DEDENT><DEDENT>if not empty:<EOL><INDENT>contours.append(current_contour)<EOL><DEDENT>return contours<EOL>
Returns a list of contours in the path, as BezierPath objects.
A contour is a sequence of lines and curves separated from the next contour by a MOVETO.
For example, the glyph "o" has two contours: the inner circle and the outer circle.