discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how to print an image


From: Riccardo
Subject: how to print an image
Date: Thu, 10 May 2007 21:47:14 +0200
User-agent: GNUMail (Version 1.2.0)

Hi,

I want to add printing in PRICE (price.sf.net). The curretn version in CVS has a first attempt, which fails both on mac as on gnustep, so I seek help.

currently I essentially do:

- (void)printShowingPrintPanel:(BOOL)showPanels
{
NSPrintOperation *op = [NSPrintOperation printOperationWithView:[windowController view] printInfo:[self printInfo]];
    [op setShowPanels:showPanels];
[op runOperationModalForWindow:op delegate:nil didRunSelector:NULL contextInfo:NULL];
}


since I gather that the "view" (which in my case is just a subclass od NSView) will be printed. I read I have the option of including subwievs, but this is not my case: I print the view containing my image and instead I get printed the whole window it is contained in, including the scrollview...

I understand that in the future my view shall trat "printing" in drawRect slightly different than "video" to handle scaling, etc... but from the Cocoa documentaiton I understood that for a rough start it was not necesssary.

Any ideas? Hints, patches... everything welcome.

Thanks,
   Riccardo







reply via email to

[Prev in Thread] Current Thread [Next in Thread]