Using ImageDraw and UI
polymerchm last edited by
I have asked this on an older thread but will put it here for more clairty. I want to be able to place text into a custom view during its execution of mycustomview.draw(). The text will be in white superimposed over a filled black circle. I need to place the construct by x,y location and to be sure the font is sized to fit inside the circle. I think I can use ImageDraw but I am not sure how to render the image using the ui module.
omz last edited by
When you want to draw text into a custom view, I would recommend using
ImageDraw. You can also measure the size of the string before drawing, using
ui.measure_string. Have a look at the documentation for details about the font parameters etc.