Page 1 of 1

Visual invalidation

Posted: Tue Aug 09, 2005 2:52 pm
by 9342775
I am looking for a way to indicate that a chart has become invalid. Something like casting a gray shadow over the whole panel, including the series, would be good.

Posted: Wed Aug 10, 2005 2:02 pm
by Pep
Hi,

you could change the aspect of the Chart to GrayScale, using the following code :

Code: Select all

uses TeCanvas;

procedure TForm1.Chart1AfterDraw(Sender: TObject);
begin
  if CheckBox1.Checked then { do gray scale... }
     TeeGrayScale( (Chart1.Canvas as TTeeCanvas3D).Bitmap,
                   false,
                   0);
end;

procedure TForm1.CheckBox1Click(Sender: TObject);
begin
Chart1.Enabled := not checkbox1.Checked;
Chart1.Repaint;
end;

Visual invalidation

Posted: Thu Aug 11, 2005 1:52 am
by 9342775
Thannk you. I had been using the Lighting tool, but this is another option.

I looked up TeeGrayScale in the help, but I don't understand the Amethod parameter. When I switched from 0 to 1, I saw no change.

Posted: Thu Aug 11, 2005 6:32 am
by Pep
Hi,

yes, it's used to change the Method (linear or human eye), it's much similar, you can see the difference in the sample which can be found in the Demo Features project, do a search for "Gray Scale".