Improve draw.legend UI
JamesSng opened this issue · comments
James Sng commented
Description
The current legend draws the background box with a fixed width (150 pixels). This can cause text to exceed the boundaries of the background box if the text is too long.
Proposed Solution
Use cv2.getTextSize()
to precompute the required width of the background box.
Lee Ping Ng commented
Perhaps can include a config option to change the translucency of the box as well.