#1 2015-05-14 11:55:50

Marcelo Economatica
Member
Registered: 2014-10-06
Posts: 3

VCLCanvas and Clipping Region

I have a complex drawing procedure which produces a graph that I want to export to PDF.

This drawing procedure has optimizations that relies on the clipping region of the canvas DC. When drawing on screen or printer, the resulting graph is the expected result.

Using the TPdfDocumentGDI.VCLCanvas, this procedure results a truncated graph when drawing large graphs.

After some debugging, I found that the cause of this problem is the fact that the VCLCanvas is based on the screen DC and its clipping region equals the desktop area. Therefore the graph is truncated because the procedure relies on the clipping region. Since the clipping region is fixed by the screen DC, I can not enlarge it.

Can you give me some advice? It will be hard for me to change the drawing procedure, any workarounds will be welcome.

Offline

#2 2015-05-14 13:01:01

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,666
Website

Re: VCLCanvas and Clipping Region

Did you try with the latest version from our source code repository?
http://synopse.info/files/mORMotNightlyBuild.zip

Have you some patch to provide?

Offline

#3 2015-05-14 18:22:45

Marcelo Economatica
Member
Registered: 2014-10-06
Posts: 3

Re: VCLCanvas and Clipping Region

I have tried the latest version, same results.

UPDATE: I will try to provide a simple case to reproduce the problem.

Last edited by Marcelo Economatica (2015-05-14 18:27:21)

Offline

#4 2015-05-14 18:58:06

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,666
Website

Re: VCLCanvas and Clipping Region

OK.

But please understand that TMetaFile is so complex, and input application stream is so verstatile, that it is almost impossible to fit all needs.
Sometimes, fixing one thing for a given 5% case do break 35% of the existing apps...

Offline

Board footer

Powered by FluxBB