Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSQuickDraw printing



Hello list !
Can anybody tell me how can I convince an NSQuickDraw to send his drawings to the printing ?

I'm doing something like this (see below ) and all QuickDraw drawing is directed to screen even when I select "Print" (from application menu) but Cocoa drawing is on printer.

I assume it has something to do with the qdPort, but I have no idea what and how to set it up correctly.


@implementation MyQuickDrawView

- (void) drawRect:(NSRect) aRect
{
//cocoa drawing

[[NSColor yellowColor] set];
[NSBezierPath fillRect:aRect];

//QuickDraw drawing
SetPort([self qdPort]);

PenSize(2,8);
ForeColor(redColor);
BackColor(whiteColor);
MoveTo(0,0);
LineTo(200,200);
LineTo(100,200);
LineTo(200,100);
}

Cristian
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.