Visual invalidation

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
mc
Newbie
Newbie
Posts: 26
Joined: Fri Jul 15, 2005 4:00 am

Visual invalidation

Post by mc » Tue Aug 09, 2005 2:52 pm

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.

Pep
Site Admin
Site Admin
Posts: 3299
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Wed Aug 10, 2005 2:02 pm

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;

mc
Newbie
Newbie
Posts: 26
Joined: Fri Jul 15, 2005 4:00 am

Visual invalidation

Post by mc » Thu Aug 11, 2005 1:52 am

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.

Pep
Site Admin
Site Admin
Posts: 3299
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Thu Aug 11, 2005 6:32 am

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".

Post Reply