質問

私は、石英組成を用いて特定の3Dプロットと表面を描くために多くの時間と努力を払った。すべてが私の(Cocoa)アプリケーションのQCViewで素晴らしく見えます。ただし、印刷するには、QCViewのスナップショットを取得してNSIMageを生成し、印刷オプション画面のNSViewに入れることができます。ただし、スナップショット内の線や色は恐ろしいことに異常に見えます。NSIMageが私のQCViewの内容と同じくらい良いように見えるように、私のQCViewから直接印刷する、またはスナップショットを迂回/上書きする方法はありますか?QCViewはNSVIELから継承しますが、組み込みの印刷方法は機能していないようです。

ありがとう!

役に立ちましたか?

解決 2

Thanks smokris, but I found that the way to do this is to take a CGImage snapshot. I thought I'd be able to put this snapshot in an IKImageView, which preserves anti-aliasing, but IKImageView suffers from the same issue QCView, in that when print is called you get nothing in your print window.

So, the method that finally worked is to create pdf data from the CGImage snapshot using a CGPDFContext, load up an NSImageView with an NSImage generated from this pdf data, and when this goes to a print window all anti-aliasing is preserved! Very roundabout, but works like charm!

他のヒント

The obliteration of antialiasing might have something to do with alpha-transparency. As the lowest layer in your Composition, do you have a Clear patch set to opaque black? (It defaults to transparent black, which might be causing the problem here.)

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top