I have a BufferedGraphics instance and I draw some graphs on it. I’d like to create a function called DrawLegends that takes an instance of BufferedGraphics and draws two strings as legend.
I can create a PointF instance that points to (0, 0), but I want to put the legend on the bottom. How should I proceed with that? Can I do it with the BufferedGraphics instance or would I also need the panel that I’m drawing on?
The important thing is that you need to know the dimensions (mainly height) of the drawing canvas (i.e. the panel). This will be used to ultimately calculate the position of the legend. So if you don’t have the height information stored elsewhere then yes, you will have to use the panel to some degree