How do I prevent too many labels to be drawn on screen?

Label classes expose the OnScreenPosition property that allow you to know their position on the screen 2D surface. Using this information you can subdivide the screen surface in a grid and prevent multiple labels to be drawn in the same grid cell. The right place to do all of this is the ViewportLayout.Viewport[i].DrawOvelay() method that needs to be overridden. Just before calling the base class implementation you will set the specific label Visible property to true/false.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request



Please sign in to leave a comment.