Roassal3
Roassal3 copied to clipboard
Support Level of Detail simplification for text
Due to zoom out effect, text labels can be illegible so probably a view render can be optimized by drawing a horizontal line instead. Example of the scenario:

I read this technique is called Level of Detail in 3d rendering, that simplifies the polygons and textures that are too far away from the camera.
The thickness of the horizontal line should be the height of the text. So, I add to this issue: if the height of the text will be much less than a pixel, then it can just be ignored in rendering. I mean, something like:
- [ textHeight > 3 pixels ] => [ renderText ]
- [ textHeight <= 3 pixels ] => [ renderLine ]
- [ textHeight < 0.5 pixels ] => [ doNothing ]
What do you think?
Make sense to me. We could have 8 pixels and 3 pixels as thresholds instead.
In this case should I put and interaction for the canvas to do that or is this supposed to be the default behavior of rendering for RSLabel?
Do we still need this?
Created new class to handle this behaviour RSZoomLevelText https://user-images.githubusercontent.com/10532890/195396232-9734a609-2087-4cb1-a3f7-497d2cbb0406.mov