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 687 - TColorLineTool seems to blend its color with the series drawn
Summary: TColorLineTool seems to blend its color with the series drawn
Status: CONFIRMED
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Tools (show other bugs)
Version: 140220
Hardware: PC Windows
: --- enhancement
Target Milestone: ---
Assignee: Steema Issue Manager
URL: http://www.teechart.net/support/viewt...
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-31 06:57 EDT by yeray alonso
Modified: 2014-03-31 11:52 EDT (History)
1 user (show)

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


Attachments
colorline blend (13.24 KB, image/png)
2014-03-31 06:57 EDT, yeray alonso
Details

Note You need to log in before you can comment on or make changes to this bug.
Description yeray alonso 2014-03-31 06:57:12 EDT
Created attachment 144 [details]
colorline blend

TColorLineTool seems to blend its color with the series drawn.
See the example below and the image attached

uses Series, TeeTools;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Chart1.View3D:=false;

  Chart1.Axes.Left.Grid.Visible:=false;
  Chart1.Axes.Bottom.Grid.Visible:=false;

  with Chart1.AddSeries(TBarSeries) do
  begin
    Color:=clRed;
    Pen.Width:=5;
    AddArray([10,20,10,20]);
  end;

  with Chart1.AddSeries(TLineSeries) do
  begin
    Color:=clBlue;
    Pen.Width:=5;
    AddArray([20,10,20,10]);
  end;

  with Chart1.Tools.Add(TColorLineTool) as TColorLineTool do
  begin
    Pen.Color:=clRed;
    Pen.Width:=5;
    Axis:=Chart1.Axes.Left;
    Value:=18;
  end;
end;
Comment 1 david berneda 2014-03-31 11:52:31 EDT
I think this is as designed. When the cursor tool FullRepaint is False, the only way to avoid repainting the whole chart is by using "xor" painting mode, which blends foreground and background colors.

Setting FullRepaint:=True will repaint the whole chart at every cursor drag movement, without doing the "xor" color blending.

Note: Firemonkey does not support "xor" painting, so every time all tools repaint the whole chart (FullRepaint is always True).

In VCL, GDI supports xor painting natively, but with GDI+ canvas we're using an internal GDI canvas to do it.  OpenGL does not support xor painting.

The FullRepaint reason is speed. If you have a one-million series chart and a cursor tool, moving the cursor will take a lot of time if the chart has to be fully repainted.