Frage

Ich habe viel Zeit und Anstrengung, um bestimmte 3D-Parzellen und Oberflächen mit einer Quarzzusammensetzung zu zeichnen.Alles sieht wunderbar in der QCView-Anwendungen (Kakao) aus.Um jedoch zu drucken, mache ich jedoch eine Momentaufnahme der QCView, um eine NSImage zu generieren, und legen Sie das in eine NSView für meinen Druckoptionsbildschirm ein.Die Linien und Farben im Snapshot sehen jedoch sorgfältig aus.Gibt es einen anderen Weg, um entweder direkt aus meiner QCView direkt zu drucken, oder um einen Schnappschuss zu umgehen / überschreiben, so dass die NSImage so gut aussieht, wie in meiner QCView ist?Qcview erbt aus NSView, aber die eingebaute Druckmethode scheint nicht zu funktionieren.

danke!

War es hilfreich?

Lösung 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!

Andere Tipps

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.)

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top