Hi,
I am using Teechart V8.07. How can I activate the gdiplus function ?
with best regards
Werner
How to use Teegdiplus
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: How to use Teegdiplus
Hi Werner,
There's an example at the new features demo at All Features\Welcome!\3D Canvas\GDI+ Canvas, the demo is available at TeeChart's program group.
There's an example at the new features demo at All Features\Welcome!\3D Canvas\GDI+ Canvas, the demo is available at TeeChart's program group.
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 |
Re: How to use Teegdiplus
Dear Narcis,
I have tried it, but I don't succeed at least.
In the function TGDIPLUSCanvas.GDPIColor I get a runtime error out of range.
I have modified with {$R-}, now the error disappeared, but the colors are not correct.
I have it tried on Xp and Win 7
with best regards
Werner
function TGDIPlusCanvas.GDIPColor(AColor:TColor):{$IFDEF CLR}Color{$ELSE}TColor{$ENDIF};
begin
AColor:=ColorToRGB(AColor);
{$IFDEF CLR}
result:=Color.FromArgb(AColor);
{$ELSE}
{$R-}
result:= ( Byte(AColor shr 16) or
(DWORD(Byte(AColor shr ) shl GreenShift) or
(DWORD(Byte(AColor)) shl RedShift) or
(DWORD(Transparency) shl AlphaShift));
{R+}
{$ENDIF}
end;
I have tried it, but I don't succeed at least.
In the function TGDIPLUSCanvas.GDPIColor I get a runtime error out of range.
I have modified with {$R-}, now the error disappeared, but the colors are not correct.
I have it tried on Xp and Win 7
with best regards
Werner
function TGDIPlusCanvas.GDIPColor(AColor:TColor):{$IFDEF CLR}Color{$ELSE}TColor{$ENDIF};
begin
AColor:=ColorToRGB(AColor);
{$IFDEF CLR}
result:=Color.FromArgb(AColor);
{$ELSE}
{$R-}
result:= ( Byte(AColor shr 16) or
(DWORD(Byte(AColor shr ) shl GreenShift) or
(DWORD(Byte(AColor)) shl RedShift) or
(DWORD(Transparency) shl AlphaShift));
{R+}
{$ENDIF}
end;
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: How to use Teegdiplus
Dear Werner,
Can you please attach a simple example project or code snippet we can run "as-is" to reproduce the problem here?
Thanks in advance.
Can you please attach a simple example project or code snippet we can run "as-is" to reproduce the problem here?
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 |
Re: How to use Teegdiplus
Dear Narcis,
I have uploaded the zip file TestGDIPlus.
Please press the load button and load Dadmix.01z, the chart will be loaded. Zoom rectangle will be shown in case of zoom.
After pressing the gdi+ button the chart change the color to red only and the zoom rectangle will be not shown anymore.
with best regards
Werner
I have uploaded the zip file TestGDIPlus.
Please press the load button and load Dadmix.01z, the chart will be loaded. Zoom rectangle will be shown in case of zoom.
After pressing the gdi+ button the chart change the color to red only and the zoom rectangle will be not shown anymore.
with best regards
Werner
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: How to use Teegdiplus
Hi Werner,
Thanks for the example code. I think I could narrow down the issue to this code:
Setting FastBrush to False works fine. I've checked this also works fine in your example. Anyway, I have added the defect (TV52015236) to the bug list to be fixed for future releases.
The zoom pen issue already works fine using TeeChart Pro 2010 VCL. GDI+ canvas has been improved substantially in 2010 version.
Thanks for the example code. I think I could narrow down the issue to this code:
Code: Select all
uses TeeGDIPlus, TeeSurfa;
procedure TForm1.FormCreate(Sender: TObject);
var g :TGDIPlusCanvas;
begin
g:=TGDIPlusCanvas.Create;
Chart1.Canvas:=g;
Chart1.AddSeries(TSurfaceSeries.Create(Self)).FillSampleValues;
(Chart1[0] as TSurfaceSeries).FastBrush:=True;
end;
The zoom pen issue already works fine using TeeChart Pro 2010 VCL. GDI+ canvas has been improved substantially in 2010 version.
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 |