2D differentiable rendering?

Are there any libraries available for 2D differentiable rendering of shapes (i.e. circles, lines, polygons) or similar structures?