def draw(self, viewer):
        cache = self.get_cache(viewer)

        if not cache.drawn:
            cache.drawn = True
            viewer.redraw(whence=2)

        cpoints = self.get_cpoints(viewer)
        cr = viewer.renderer.setup_cr(self)

        # draw optional border
        if self.linewidth > 0:
            cr.draw_polygon(cpoints)

        if self.showcap:
            self.draw_caps(cr, self.cap, cpoints)
Simplify bessel-type functions.
dataset/ETHPy150Open ejeschke/ginga/ginga/canvas/types/image.py/Image.draw--crossover with--dataset/ETHPy150Open sympy/sympy/sympy/simplify/simplify.py/besselsimp