TAChart: tiny visual improvement
Original Reporter info from Mantis: Marcin Wiazowski
-
Reporter name:
Original Reporter info from Mantis: Marcin Wiazowski
- Reporter name:
Description:
It's not a big thing, just a small improvement. Especially when chart is not the only form's component (so it's relatively small), resizing the form may make the chart so small, that its clipping rect becomes inverted, i.e. (Top > Bottom) and/or (Left > Right). This causes ugly visual effects - please take a look at the attached animation.
Changes in the attached patch are not very complicated:
- in TChart.PrepareAxis() the clipping rect is set - so it should be finally corrected if needed; thanks to that, the back wall drawing machinery doesn't receive an invalid rect,
- in TChartAxisList.Prepare(), an empty/invalid clipping rect should be detected, so axes should be initialized with empty rects (without this, some calculations are performed on this empty/invalid clipping rect, so axes' titles are either repositioned strangely, or some of them are still drawn),
- TChartAxis.Draw() and TChartAxis.DrawTitle() should detect empty/invalid rect and just exit.
Regards
Mantis conversion info:
- Mantis ID: 35010
- Build: 60335
- Version: 2.1 (SVN)
- Fixed in revision: 60336 (#3d14e655)
- Target version: 2.0.2