使用 GDI 打印+没有效果
我不久前将 GDI+ 添加到我的 Win32 应用程序中以绘制渐变。我解决了考虑混合 GDI 和 GDI+ 输出的一些问题,一切正常。
现在我也开始使用 GDI+ 进行打印,但所有对 GDI+ 的调用似乎都被忽略,在屏幕上工作得很好。我仔细检查了没有剪切区域。坐标也写在纸上。我还消除了所有 GDI 输出以进行测试。仍然显示空白页。我尝试了几台打印机。使用 GDI+ 打印示例进行的测试无需问题。我将应用程序中使用的代码添加到示例中,它也可以正常运行。
有什么想法吗?
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. 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我最近遇到了类似的问题 - 从 DC 创建 Graphics 对象应用了不明显的缩放因子,并且我的东西全部渲染在页面之外。修复它很简单:
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: