渐变填充图像以灰度打印

时间:2018-03-09 09:09:52

标签: objective-c macos

我正在使用渐变填充绘制图像。

Printing_View* my_print_view =[[Printing_View alloc] initWithFrame:frame];

NSPrintOperation* printOperation = [NSPrintOperation printOperationWithView:my_print_view printInfo:pass_info];

 [printOperation setCanSpawnSeparateThread:YES];
        [printOperation setShowsPrintPanel:NO];

[printOperation runOperationModalForWindow:window delegate:window didRunSelector:nil contextInfo:nil];

and draw image in draw rect of my view class

[drawing_image drawInRect:drawing_rect
                             fromRect:NSZeroRect
                            operation:NSCompositeCopy
                             fraction:1.0];

它在预览中看起来不错,但是当我打印此图像时,灰度图像打印我真的不明白会发生什么。

请帮帮我。

0 个答案:

没有答案