![]() | 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: | BackImage & pbmStretch causes wrong rendering | ||
|---|---|---|---|
| Product: | VCL TeeChart | Reporter: | narcís calvet <narcis> |
| Component: | Canvas | Assignee: | Steema Issue Manager <issuemanager> |
| Status: | RESOLVED FIXED | ||
| Severity: | enhancement | CC: | david |
| Priority: | --- | ||
| Version: | 131016 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows | ||
| URL: | http://www.codeproject.com/Articles/14884/BorderBug | ||
| Chart Series: | --- | Delphi / C++ Builder RAD IDE Version: | |
| Attachments: |
test project
Modified test project showing differences between GDI and GDI+ |
||
GDI+ : This is due to the named "BorderBug" of GDI+: http://www.codeproject.com/Articles/14884/BorderBug One solution for "flat" (no detail) images that are enlarged, is to use "low" stretch quality. Chart1.Canvas.StretchDrawQuality:=sqLow; but, this property is at canvas level, and not at Chart BackImage level. I'll implement this as an option at BackImage level so it'll be available for any chart element shape back picture, ie: Chart1.BackImage.DrawQuality := sqLow; --------------------------------------------- GDI : With GDI, TeeChart does its own stretch algorithm instead of using GDI StretchBlt, to obtain a better smooth quality. This works fine when both reducing or enlarging an image, but emits noise when on content areas that are "flat" (no detail, such as single color backgrounds). The above DrawQuality property will also be handy with GDI, to use the default GDI stretch instead of the internal one. Created attachment 14 [details]
Modified test project showing differences between GDI and GDI+
Fixed with TBackImage.DrawQuality new property. Default is "sqHigh". |
Created attachment 12 [details] test project If you add a BackImage and set BackImageMode to pbmStretch, there are painting issues along the left and right borders of the chart. The painting artifacts are not visible when the BackImageMode is set to pbmTile. The problem gets worse when rendering is changed from GDI+ to GDI. Note that the issue is visible during design-time and run-time. Find attached project reproducing this.