سؤال

لقد وضعت الكثير من الوقت والجهد في رسم مؤامرات ثلاثية الأبعاد معينة وأسطح باستخدام تكوين كوارتز.كل شيء يبدو رائعا في QCView الخاص بي (الكاكاو).ومع ذلك، من أجل الطباعة، أنا آخذ لقطة من QCView لتوليد NSIMAGE، ووضع ذلك في NSView لشاشة خيارات الطباعة الخاصة بي.ومع ذلك، فإن الخطوط والألوان في اللقطة تبدو مستعشاة بشدة.هل هناك طريقة أخرى إما الطباعة مباشرة من QCView، أو تجاوز / تجاوز أخذ لقطة حتى تبدو NSIMAGE جيدة مثل ما هو في QCView الخاص بي؟يرث qcview من NSView، ولكن يبدو أن طريقة الطباعة المدمجة لا تعمل.

شكرا!

هل كانت مفيدة؟

المحلول 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