#1 2017-06-15 10:10:55

davidheffernan
Member
Registered: 2013-05-16
Posts: 22

VCLCanvasSize returns (0, 0) if VCLCanvas has not been initialised

I found an oddity in code where I accessed VCLCanvasSize before VCLCanvas. Since the VCLCanvas is lazily created on demand, this scenario leads to GetVCLCanvasSize accessing fVCLCanvasSize before it has been initialised. I worked around this by making sure that I access VCLCanvas before VCLCanvasSize, but I think that this protection should be implemented inside SynPdf.

Offline

#2 2017-06-16 07:12:39

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

Re: VCLCanvasSize returns (0, 0) if VCLCanvas has not been initialised

Online

#3 2017-06-16 09:43:09

davidheffernan
Member
Registered: 2013-05-16
Posts: 22

Re: VCLCanvasSize returns (0, 0) if VCLCanvas has not been initialised

Thanks, that's exactly what I was hoping for. I can now remove my workaround.

Thanks for you help.  I've not got my N pages per sheet PDF generation complete.

Offline

Board footer

Powered by FluxBB