Re: scaling down without NSImage while printing
Re: scaling down without NSImage while printing
- Subject: Re: scaling down without NSImage while printing
- From: Hidetomo Katsura <email@hidden>
- Date: Thu, 23 Dec 2004 11:11:48 -0800
i figure it out. the following code seems to work on 10.2.8 as well
while printing.
view = [[NSView alloc] initWithFrame:srcRect];
[self addSubview:view];
[view scaleUnitSquareToSize:scaleSize];
[view lockFocus];
[customView drawRect:srcRect];
[view unlockFocus];
[view removeFromSuperview];
[view release];
thanks anyway,
katsura
On Dec 23, 2004, at 9:20 AM, Hidetomo Katsura wrote:
the following code works fine on 10.3.7 but fails on 10.2.8 while
printing. i need to scale srcRect down to dstRect to make it fit in
the page size.
image = [[NSImage alloc] initWithSize:srcRect];
[image lockFocus];
[view drawRect:srcRect];
[image unlockFocus];
[image drawInRect:dstRect fromRect:srcRect operation:NSCompositeCopy
fraction:1.0];
[image release];
how can i scale it down without using NSImage on 10.2.8 while
printing? any suggestions?
thanks in advance,
katsura
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden