Possible issue with TeecreateMetafile

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
johnnix
Newbie
Newbie
Posts: 11
Joined: Wed Jun 14, 2017 12:00 am

Possible issue with TeecreateMetafile

Post by johnnix » Fri Jan 19, 2018 9:40 am

Hello,

I thing there maybe an issue with TeeCreateMetafile when display scaling is enabled. The attached metafile was created with screen resolution set to 3200x1800 and scaling 150%. Anyone else noticed that behavior? (TeeCreateBitmap works ok)

Regards
Attachments
test.zip
(20.29 KiB) Downloaded 1097 times

johnnix
Newbie
Newbie
Posts: 11
Joined: Wed Jun 14, 2017 12:00 am

Re: Possible issue with TeecreateMetafile

Post by johnnix » Mon Jan 22, 2018 2:36 pm

Attached is the sample code I used to create the wmf and bmp. When setting the resolution to a high one and scaling is larger than 100% then the wmf is not exported correctly
Attachments
Test Project.zip
(5.54 KiB) Downloaded 1079 times

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

Re: Possible issue with TeecreateMetafile

Post by Yeray » Tue Jan 23, 2018 9:38 am

Hello,

This very same issue was discussed here, isn't it the same?
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

johnnix
Newbie
Newbie
Posts: 11
Joined: Wed Jun 14, 2017 12:00 am

Re: Possible issue with TeecreateMetafile

Post by johnnix » Wed Jan 24, 2018 7:55 am

Hello Yeray,

Apparently yes, thank you for the information!

Regards

johnnix
Newbie
Newbie
Posts: 11
Joined: Wed Jun 14, 2017 12:00 am

Re: Possible issue with TeecreateMetafile

Post by johnnix » Wed Jan 24, 2018 9:27 am

Ok, it looks like that I cannot make the app create the "correct" size metafile unless I have the Enable High-DPI checked in the Project->Option->Application section. I was looking for a solution for the metafile issue when the High-DPI is unchecked ... maybe there is a work around?

Regards

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

Re: Possible issue with TeecreateMetafile

Post by Yeray » Thu Jan 25, 2018 9:24 am

Hello,
johnnix wrote:maybe there is a work around?
None that I know (other than using a custom manifest with "dpiAware" set to 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

johnnix
Newbie
Newbie
Posts: 11
Joined: Wed Jun 14, 2017 12:00 am

Re: Possible issue with TeecreateMetafile

Post by johnnix » Thu Jan 25, 2018 3:41 pm

Hello Yeray,

There is a work around, you need to set the metafile MMWidth and MMHeight properties, I modified the TeeCreateMetafile to do so (resulting metafile looks great) but there is an issue on how to get the custom system scaling value (remember I need not to enable the dpi-aware feature).

Regards

Post Reply