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

Re: Printing


  • Subject: Re: Printing
  • From: "Johan Kool" <email@hidden>
  • Date: Thu, 18 May 2006 11:34:31 +0200

Hello Paolo,

Could someone point me to documentation that explains how to subclass
NSView and, most of all, override drawRect when the view is printed?
Tutorials too would be very useful.

You can use this in your NSView's subclass drawRect: method to determine wether you are printing or drawing to screen:

if ([NSGraphicsContext currentContextDrawingToScreen]) {
   // Draw to screen commands
} else {
   // Draw for print
}

Btw: what's the reason of the Cocoa vertically-flipped coordinate
system?? Anyone likes it?

There surely are times wether one or the other is handier for the implementation.

Kind regards,

Johan
--
http://www.johankool.nl/
_______________________________________________
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


  • Follow-Ups:
    • Re: Printing
      • From: Paolo Bertani <email@hidden>
References: 
 >Printing (From: Paolo Bertani <email@hidden>)

  • Prev by Date: Printing
  • Next by Date: Re: Printing
  • Previous by thread: Printing
  • Next by thread: Re: Printing
  • Index(es):
    • Date
    • Thread