![]() | Steema Issues DatabaseNote: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;otherwise you can use StackOverflow. Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy. |
| Summary: | Exporting to Metafile with checkboxes in the legend gives unaligned checkboxes from v2013.09 | ||
|---|---|---|---|
| Product: | VCL TeeChart | Reporter: | yeray alonso <yeray> |
| Component: | Export | Assignee: | Steema Issue Manager <issuemanager> |
| Status: | RESOLVED FIXED | ||
| Severity: | enhancement | CC: | david |
| Priority: | --- | ||
| Version: | 131119 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows | ||
| URL: | http://www.teechart.net/support/viewtopic.php?f=3&t=14775&p=65295#p65295 | ||
| Chart Series: | --- | Delphi / C++ Builder RAD IDE Version: | |
| Attachments: |
Metafile with checkboxes in the legend
screenshots |
||
It worked fine with GDI+ in 2013.08 ? There is nothing in the code that makes a difference GDI vs GDI+ Created attachment 125 [details]
screenshots
Yes. If I run the project attached in Delphi 7
With v2013.08:
- GDI+ gives aligned checkboxes in the legend
- GDI gives aligned checkboxes in the legend
With v2013.09 and up:
- GDI+ gives unaligned checkboxes in the legend
- GDI gives aligned checkboxes in the legend
See the images attached
This is very strange. The displacement equals to checkbox height, but only when the chart canvas is GDI+. When drawing the checkbox, the chart GDI or GDI+ canvas is not used at all. Checkbox is drawn using Windows API call and only using the TMetafileCanvas. The vertical coordinate is exactly the same in both canvas. Fixed. The fix is not very appropiate but solves the problem for now, until the real cause can be discovered. if (ParentChart.Canvas.ReferenceCanvas is TMetafileCanvas) and ParentChart.Canvas.SupportsAlpha then Inc(tmpY,13); TeeDrawCheckBox( ... |
Created attachment 121 [details] Metafile with checkboxes in the legend Exporting to Metafile with checkboxes in the legend gives unaligned checkboxes from v2013.09. It works fine in GDI, not in GDI+ in v2013.09 and above. It worked fine in 2013.08. See the attached project.