Description
Summary
draw_gouraud_triangle
is used as the primitive drawing method of the base draw_gouraud_triangles
.
matplotlib/lib/matplotlib/backend_bases.py
Lines 321 to 322 in f8cf0ee
However, a backend that overloads draw_gouraud_triangles
may not have to define a draw_gouraud_triangle
method (except that it may be a suitable name) as any code only calls draw_gouraud_triangles
at the "top level".
This leads to that some draw_gouraud_triangle
methods will never be called (e.g. Agg, PDF and PS backends), where the PDF and PS backends actually does it the other way round:
matplotlib/lib/matplotlib/backends/backend_pdf.py
Lines 2156 to 2158 in f8cf0ee
Proposed fix
Is it realistic that there will be an artist that calls draw_gouraud_triangle
directly or should we just drop those unused methods and somehow clarify that if draw_gouraud_triangles
is overloaded in a backend, there is no need to overload draw_gouraud_triangle
? (If there is ever such an artist, we can just use the PDF/PS backend code to use draw_gouraud_triangles
instead.) Not sure if there is some documentation about what methods a backend is expected to have though.
It seems to be a waste maintaining code that in practice is dead.