def draw(self, renderer):
if not self.get_visible(): return<EOL>gc = renderer.new_gc()<EOL>if cbook.is_string_like(self._edgecolor) and self._edgecolor.lower()=='<STR_LIT:none>':<EOL><INDENT>gc.set_linewidth(<NUM_LIT:0>)<EOL><DEDENT>else:<EOL><INDENT>gc.set_foreground(self._edgecolor)<EOL>gc.set_linewidth(self._linewidth)<EOL>gc.set_linestyle(self._linestyle)<EOL><DEDENT>gc.set_antialiased(self._antialiased)<EOL>self._set_gc_clip(gc)<EOL>gc.set_capstyle('<STR_LIT>')<EOL>gc.set_url(self._url)<EOL>gc.set_snap(self._snap)<EOL>if (not self.fill or self._facecolor is None or<EOL>(cbook.is_string_like(self._facecolor) and self._facecolor.lower()=='<STR_LIT:none>')):<EOL><INDENT>rgbFace = None<EOL>gc.set_alpha(<NUM_LIT:1.0>)<EOL><DEDENT>else:<EOL><INDENT>r, g, b, a = colors.colorConverter.to_rgba(self._facecolor, self._alpha)<EOL>rgbFace = (r, g, b)<EOL>gc.set_alpha(a)<EOL><DEDENT>if self._hatch:<EOL><INDENT>gc.set_hatch(self._hatch )<EOL><DEDENT>path = self.get_path()<EOL>transform = self.get_transform()<EOL>tpath = transform.transform_path_non_affine(path)<EOL>affine = transform.get_affine()<EOL>renderer.draw_path(gc, tpath, affine, rgbFace)<EOL>
Draw the :class:`Patch` to the given *renderer*.