• 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: beginPageInRect?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: beginPageInRect?


  • Subject: Re: beginPageInRect?
  • From: Mark Piccirelli <email@hidden>
  • Date: Tue, 19 Feb 2002 20:12:29 -0800

On Wednesday, February 13, 2002, at 04:07 PM, Michhle Garoche wrote:

Many thanks, Mark.

So, if I understand well that is where I can draw a border around the text and put the page's number?

Probably not. Other developers have tried that, and it doesn't work. If you attempt to draw text outside of the area of the page where the view image itself is to be drawn, it will be clipped away.

The right place to draw page borders and other things in the page's margins is supposed to be in -drawPageBorderWithSize:. Unfortunately, there's a bug that prevents text drawn in -drawPageBorderWithSize: from appearing properly there too (that's why other developers were attempting to draw page adornments in -beginPageInRect:atPlacement:).

Brant Vasilieff, who's active on this list, sent me a description of his workaround for this problem. He created a special view subclass that draws things like page numbers as part of the view itself, in -drawRect:. The view's -rectForPage: method takes into account the fact that the page's margins have to be considered part of the page's printing area (right Brant?).

A bit more work than should be necessary, but right now this is the only workaround I can suggest. Hope it helps...

-- Mark
_______________________________________________
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: 
 >Re: beginPageInRect? (From: Michèle Garoche <email@hidden>)

  • Prev by Date: Re: Command-Line Compilers?
  • Next by Date: Re: Command-Line Compilers?
  • Previous by thread: Re: beginPageInRect?
  • Next by thread: determining availability of a given glyph via NSFont
  • Index(es):
    • Date
    • Thread