• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Print 2 pages from customview
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Print 2 pages from customview (From: Ivan Myrvold <email@hidden>)

  • Prev by Date: date picker
  • Next by Date: [ANN] Updated source code: Colored Checkboxes, Source List
  • Previous by thread: RE: Print 2 pages from customview
  • Next by thread: Program worked under Xcode 1.0.1, crashes under Xcode 1.1
  • Index(es):
    • Date
    • Thread