Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What is the difference for TChart Canvas between Delphi 3 and 4 or lat

Status
Not open for further replies.

shengli

Programmer
May 6, 2003
1
CA
Hello All,


I haven't programming in Delphi for about 3 years. I want to recompile source code from Delphi 3 to 4. It seems that I cannot easily compile my source code.

In old code, I have a TMChart, which is the decedant of the TChart, and I added a procedure to draw a marker on the Chart Canvas, the source code is as follow:

Procedure TMChart.DrawMarker(X,Y:Longint; ACanvas:TCanvas);
begin
with ACanvas do
begin
Pen.Mode:= pmXor;
Pen.Color:= FLeftMarkerColor;
Pen.Style:= psSolid;
Pen.Width:=1;
MoveTo(X,ChartRect.Top-Height3D);
LineTo(X,ChartRect.Bottom-Height3D);
RoundRect(X-5, Y-4, X+5, Y+5, X-4, Y-5);
end;
end;

The error message is this:

[Error] MChart.pas(309): Incompatible types: 'TCanvas' and 'TCanvas3D'

I need your help, thanks in advance.

shengli
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top