FROM : Troy Stephens
DATE : Fri Jan 04 18:56:30 2008
On Jan 4, 2008, at 2:27 AM, Timothy J. Wood wrote:
> I'm hoping that this is possible, but so far it seems like NSView's
> that are layer-backed don't print (not even a bitmap!)
>
> Tell me I'm wrong and we haven't stepped back into the dark ages...
> =)
>
> -tim
Hi Tim,
Sorry to say there is indeed a bug that causes the views' drawing to
be redirected to their backing layers, even though the views are being
asked to draw for the purpose of printing.
Ways this can be worked around:
(1) temporarily switch off layer-backing of the view (or view
hierarchy) during printing, or
(2) print from an identically configured offscreen view (or hierarchy)
that isn't layer-backed, or
(3) if your views are employing visual effects that only work in layer-
backed mode (effects that are rendered by Core Animation: view
filters, shadows, alpha) and you need those same effects to appear in
the printed output, use a CARenderer to render the layer tree to
bitmapped form, then print the bitmap.
I'll see about fixing this. In the meantime, I hope the above will
help get you un-stuck.
Regards,
Troy
--
Troy Stephens
Cocoa Frameworks
Apple, Inc.
DATE : Fri Jan 04 18:56:30 2008
On Jan 4, 2008, at 2:27 AM, Timothy J. Wood wrote:
> I'm hoping that this is possible, but so far it seems like NSView's
> that are layer-backed don't print (not even a bitmap!)
>
> Tell me I'm wrong and we haven't stepped back into the dark ages...
> =)
>
> -tim
Hi Tim,
Sorry to say there is indeed a bug that causes the views' drawing to
be redirected to their backing layers, even though the views are being
asked to draw for the purpose of printing.
Ways this can be worked around:
(1) temporarily switch off layer-backing of the view (or view
hierarchy) during printing, or
(2) print from an identically configured offscreen view (or hierarchy)
that isn't layer-backed, or
(3) if your views are employing visual effects that only work in layer-
backed mode (effects that are rendered by Core Animation: view
filters, shadows, alpha) and you need those same effects to appear in
the printed output, use a CARenderer to render the layer tree to
bitmapped form, then print the bitmap.
I'll see about fixing this. In the meantime, I hope the above will
help get you un-stuck.
Regards,
Troy
--
Troy Stephens
Cocoa Frameworks
Apple, Inc.
| Related mails | Author | Date |
|---|---|---|
| Timothy J. Wood | Jan 4, 11:27 | |
| douglas a. welton | Jan 4, 18:14 | |
| Troy Stephens | Jan 4, 18:56 | |
| Timothy J. Wood | Jan 4, 23:31 |






Cocoa mail archive

