Re: Print 2 pages from customview
Re: Print 2 pages from customview
- Subject: Re: Print 2 pages from customview
- From: "Louis C. Sacha" <email@hidden>
- Date: Mon, 29 Dec 2003 13:38:17 -0800
Hello...
One thing that is probably contributing to the problem would be this method:
- (NSRect)rectForPage:(int)pageNum {
NSRect frontRect = NSMakeRect([self bounds].origin.x, [self
bounds].origin.y, [self bounds].size.width, [self
bounds].size.height/2.0);
NSRect backRect = NSMakeRect([self bounds].origin.x, [self
bounds].size.height/2.0, [self bounds].size.width, [self
bounds].size.height);
if (pageNum == 1)
return frontRect;
else
return backRect;
}
When you create backRect, (assuming that your view has flipped y
coordinates based on your code) the correct rect for the second page
would be
NSRect bounds = [self bounds];
/* ... */
NSRect backRect = NSMakeRect(bounds.origin.x, bounds.origin.y +
bounds.size.height/2.0, bounds.size.width, bounds.size.height/2.0);
Hope that helps,
Louis
_______________________________________________
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.