Pergunta

Eu coloquei muito tempo e esforço para desenhar certos gráficos 3D e superfícies usando uma composição de quartzo.Tudo parece maravilhoso no meu QCView do aplicativo (cacau).No entanto, para imprimir, estou tirando um instantâneo da QCView para gerar um NSimage e colocando isso em uma tela NSVIE para minha impressão de opções de impressão.No entanto, linhas e cores no snapshot parecem horrendamente aliased.Existe alguma outra maneira de imprimir diretamente a partir do meu qcview, ou para contornar / substituir tirando um instantâneo para que o NSimage pareça tão bom quanto no meu Qcview?Qcview herda da nsview, mas o método de impressão integrado não parece funcionar.

Obrigado!

Foi útil?

Solução 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!

Outras dicas

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

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top