0
monomac에서 어떻게 인쇄합니까? 이것은 가능한 한 내 것이지만 NSView의 그래픽 컨텍스트에 대한 참조를 얻을 수없는 것 같습니다. 괜찮 았던 PrintDoc에 컨트롤을 추가했지만 그리려합니다.Monomac에서 인쇄
//Print Function
void Print(){
PrintDoc NewDoc = new PrintDoc();
NewDoc.SetFrameSize(new SizeF(600,1000));
NSPrintOperation P = NSPrintOperation.FromView (NewDoc);
P.RunOperation();
}
//NSView to be printed
class PrintDoc:NSView
{
public PrintDoc()
{
}
public override void DrawRect (System.Drawing.RectangleF dirtyRect)
{
//NSPrintOperation.CurrentOperation.Context !! this is null
//NSGraphicsContext.CurrentContext !! this hangs
}
}
사랑 나누기를! 그게 효과가 있었는데, 당신이 그 해킹을 어떻게 내놓았는지 잘 모르겠다. –