Hello !
I want to make a copy of the current chart bitmap.
Following help text I found:
TCanvas3D.ShowImage
procedure ShowImage(DestCanvas, DefaultCanvas: TCanvas; Const UserRect: TRect); virtual; abstract;
Makes copy of Canvas to other location.
procedure TForm1.Chart1AfterDraw(Sender: TObject);
begin
{Rect Right and Bottom overriden for Chart Width and Height. Copied Chart placed at Left 5,Top 5}
Chart1.Canvas.ShowImage(TCanvas(Form1.Canvas),TCanvas(Chart1.Canvas),Rect(5,5,0,0));
My Questions:
1. It is not clear what is the default canvas - image if chart has no image, yet?
2. How code in C++ TCanvas(Chart1->Canvas)
This code does not work (in C++) because Chart1->Canvas
is a TCanvas3D and not a TCanvas
Bye Andreas
Chart1.Canvas.ShowImage what arguments
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Andreas,
In that case the easiest solution would be using TChart.TeeCreateBitmap method which doesn't take any argument and returns a TBitmap.
Hope this helps!
In that case the easiest solution would be using TChart.TeeCreateBitmap method which doesn't take any argument and returns a TBitmap.
Hope this helps!
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Hello Narcís!
I know this function, but this is not what I want.
TeeCreateBitmap make a full (vector) redraw in a new bitmap.
So it is very slow - about 2 seconds for my complex graphic.
(and that for every mouse move event for my special task)
I want to access it current bitmap directy. If found this very fast code.
ChartImage is a TImage on a form;
PChart->Canvas->ShowImage(ChartImage->Picture->Bitmap->Canvas,
PChart->Canvas->ReferenceCanvas, TRect(0,0, PChart->Width, PChart->Height));
The main problem with TChart is that the usul property of TWinControl PChart->DoubleBuffered=true; does not work.
PChart->BufferedDisplay=true; does not work, too - or what is its meaning.
Is this a bug ?
Best regards
Andreas
I know this function, but this is not what I want.
TeeCreateBitmap make a full (vector) redraw in a new bitmap.
So it is very slow - about 2 seconds for my complex graphic.
(and that for every mouse move event for my special task)
I want to access it current bitmap directy. If found this very fast code.
ChartImage is a TImage on a form;
PChart->Canvas->ShowImage(ChartImage->Picture->Bitmap->Canvas,
PChart->Canvas->ReferenceCanvas, TRect(0,0, PChart->Width, PChart->Height));
The main problem with TChart is that the usul property of TWinControl PChart->DoubleBuffered=true; does not work.
PChart->BufferedDisplay=true; does not work, too - or what is its meaning.
Is this a bug ?
Best regards
Andreas
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Andreas,
Sorry for the delayed reply. Only BufferedDisplay is used in TeeChart. Code where it is used internally is this:
DoubleBuffered is not used.
Which is the difference you think it should be with or without using BufferedDisplay?
Thanks in advance.
Sorry for the delayed reply. Only BufferedDisplay is used in TeeChart. Code where it is used internally is this:
Code: Select all
Procedure TTeeCanvas3D.SetUseBuffer(Value:Boolean);
begin
if FBufferedDisplay<>Value then
begin
FBufferedDisplay:=Value;
if (not FBufferedDisplay) and Assigned(FBitmap) then
begin
if not IKeepBitmap then
begin
DeleteBitmap;
FDirty:=True;
end;
end
else
if FBufferedDisplay and Assigned(FBitmap) then
SetCanvas(FBitmap.Canvas);
end;
end;
Which is the difference you think it should be with or without using BufferedDisplay?
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |