Steema Issues Database

Note: 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.



Bug 1792 - LegendScrollBar rounding problem
Summary: LegendScrollBar rounding problem
Status: RESOLVED FIXED
Alias: None
Product: .NET TeeChart
Classification: Unclassified
Component: Tools (show other bugs)
Version: unspecified
Hardware: PC Windows
: --- enhancement
Target Milestone: ---
Assignee: Steema Issue Manager
URL: http://www.teechart.net/support/viewt...
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-20 06:00 EST by christopher ireland
Modified: 2017-02-20 08:47 EST (History)
0 users

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments
before fix (11.89 KB, image/png)
2017-02-20 06:00 EST, christopher ireland
Details
after fix (16.22 KB, image/png)
2017-02-20 06:01 EST, christopher ireland
Details

Note You need to log in before you can comment on or make changes to this bug.
Description christopher ireland 2017-02-20 06:00:27 EST
Created attachment 716 [details]
before fix

As reported in the URL.

The issue here is that the rounding problem (from double -> int for GDI+ pixels) will depend on the number of elements in the LegendScrollBar, meaning that the 'fix' of a pixel (an int of value '1') will not necessarily render correctly in all cases. 

For this code:
    private void InitializeChart()
    {
      Line series = new Line(tChart1.Chart);
      series.FillSampleValues(100);

      LegendScrollBar tool = new LegendScrollBar(tChart1.Chart);
      tool.ThumbBrush.Color = Color.Red;
      tool.Bevel.Inner = BevelStyles.None;
      tool.Bevel.Outer = BevelStyles.None;

      tChart1.CurrentTheme = ThemeType.Opera;

    }

the fix can be seen to affect rendering in the two attached images (at 3x magnification).
Comment 1 christopher ireland 2017-02-20 06:01:08 EST
Created attachment 717 [details]
after fix