MetaFile loosing linestyle

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
GoToXY
Newbie
Newbie
Posts: 81
Joined: Thu Apr 03, 2008 12:00 am

Re: MetaFile loosing linestyle

Post by GoToXY » Thu Oct 15, 2009 2:49 pm

So, to move on the subject, all i want to know and be solve is : Since delphi cant do Linestyle with width > 1, that means you use a custom function to draw lines with widths > 1.

Can you tell me if you use that function when the width is equal to 1 or not, because if its not, you should do it and it should solve my problem.

Thanks

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: MetaFile loosing linestyle

Post by Yeray » Fri Oct 16, 2009 10:11 am

Hi GoToXY,

Yes, I saw your project and I proposed a solution that works on it. But, of course, as you are trying to achieve something a little bit different in your final application, the workaround isn't appropriate for you.

Then, I thought that you have reproduced the problem drawing a Metafile created without any TeeChart intervention and that's what I was interested to see. I think I haven't understood you well.

Anyway, back to TeeChart, yes, we have a TeeSetTeePen procedure at TeCanvas.pas, that applies some settings to the pen and yes, it proceeds in a different way with lines wither than 1.

In your specific case, I think that using TeeCheckPenWidth as true, it could solve the problem. Note that this boolean is used at the mentioned procedure, and set as false by default, to fix a previous problem with some printers. So please, add the TeCanvas unit to the uses clause and the following line before creating the metafile from the chart or at OnCreate:

Code: Select all

TeeCheckPenWidth:=true;
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

GoToXY
Newbie
Newbie
Posts: 81
Joined: Thu Apr 03, 2008 12:00 am

Re: MetaFile loosing linestyle

Post by GoToXY » Fri Oct 16, 2009 5:58 pm

haaaaa!! oh yeah now you really make someone happy Yeray. 100% what i was looking for. Thanks for the hint about the printer, so if i see something weird about printing, ill turn that off.

Im sorry, im the one who seems to not have understood you about the Delphi Bug. In fact, it as the same effect of the TChart without using "TeeCheckPenWidth:=true;" I've attached a simpleApplication for you to see it.

Again, thanks a lot and i really appreciate the quality of the support you guys provide. It show me that we have spent money at the right place buying TeeChart ;)

BTW: I heared you guys are working on a flash version with a lil bit of interactivity... if you need beta tester, im your man :D hehehe
Attachments
MetaFileLineStyle.zip
Delphi Bug with MetaFile and LineStyle
(8.18 KiB) Downloaded 595 times

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: MetaFile loosing linestyle

Post by Yeray » Mon Oct 19, 2009 9:53 am

Hi GoToXY, Sylvain?¿

Yes, I think that's the project I was asking you for, that demonstrates the delphi issue. :)

I'm glad to see that you are happy with that now. And thank you for the interest on the flash feature, but note that that's not an independent version! It's only an exportation feature that we're trying to improve a little bit. :P
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

ChainSmokinCoder
Newbie
Newbie
Posts: 12
Joined: Wed Jun 01, 2005 4:00 am
Location: wellington
Contact:

Re: MetaFile loosing linestyle

Post by ChainSmokinCoder » Wed Mar 10, 2010 10:59 pm

Hi, sorry for bringing up an old thread, but I'm having the similar problem.
What I did was I created a MetaFile with TeeCreateMetafile.
Then used TBaseReport.StretchDraw passing the MetaFile. (Rave reports).
It showed the linestyle correctly on the preview but not on the paper.

By the way I use TeeChartPro v7.12 with Delphi 2005.

TeeCheckPenWidth := true; doesn't work on mine since it's a const.

Thanks.

GoToXY
Newbie
Newbie
Posts: 81
Joined: Thu Apr 03, 2008 12:00 am

Re: MetaFile loosing linestyle

Post by GoToXY » Thu Mar 11, 2010 3:35 pm

From what i know, the const TeeCheckPenWidth will override the Regular pen from Delphi to a custom TeeChart Pen that dont mess the line style in a MetaFile. So, if TeeCheckPenWidth doesnt work, im clueless because it works for me.

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: MetaFile loosing linestyle

Post by Yeray » Fri Mar 12, 2010 3:11 pm

Hi ChainSmokinCoder,

Could you please send us a simple example project we can run as-is to reproduce the problem here?
We are not planning to publish another v7 maintenance release but we can tell you if the problem is still reproducible with v8 (or next v2010).
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

ChainSmokinCoder
Newbie
Newbie
Posts: 12
Joined: Wed Jun 01, 2005 4:00 am
Location: wellington
Contact:

Re: MetaFile loosing linestyle

Post by ChainSmokinCoder » Mon Mar 15, 2010 12:31 am

Hi Yeray, I've created a new thread. Thanks for your reply.

Post Reply