开发者

Print with GDI+ has no effect

I added GDI+ to my Win32 Application for drawing gradients quite a while ago. I worked around some problems considering mixed GDI and GDI+ output and everything works fine.

Now i started to use GDI+ also for printing, but all calls to GDI+ seem to be ignored, that work fine on screen. I double checked that there is no clipping region. Also the coordinates are on paper开发者_JAVA技巧. I also eliminated all GDI output for testing. Still a blank page is shown. I tried several printers. A test with the GDI+ printing samples works without problems. I added the code used in my application to the sample, and it also works without problems.

Any idea?


I recently had a similar problem - creating a Graphics object from a DC applied a scaling factor that wasn't obvious, and my stuff was all rendering off the page. Fixing it was a simple one-liner:

graphics.SetPageUnit(UnitPixel);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜