• 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
Reports via NSView and NSString drawAtPoint:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Reports via NSView and NSString drawAtPoint:


  • Subject: Reports via NSView and NSString drawAtPoint:
  • From: J Tichenor <email@hidden>
  • Date: Sun, 10 Oct 2004 16:39:09 +0100

I am building a view which will hold all the printable data from my model, to allow for report generation. At the moment, I am setting a finite size for the view, 850 x 1100 pixels, which is approx a 8 1/2 x 11 sheet of paper (assuming 100 pixels per inch). I have set up my report printing in a separate controller and am sending the size of the "paper" to the controller, along with data from the model for printing.

The idea is to enumerate through my data model, starting at the top of the hierarchy and then work my way down, and call drawAtPoint:withAttributes: for each NSString element, placing each string in relation to it's parent, etc, using clever math, relative to the panel size. Everything is working great and fine, until I have enough data that the panel is filled. Then I'm not sure what happens.

If I print enough, starting at the top left at say 0, 1100, such that I end up below my 0,0 origin point of the view, what happens? Can you draw at 0, -100? Do you need to load a NSScroll view to be able to see what's being printed? In some ways it would make more sense from a text/report point of view to be starting with the origin at the top left of the view, rather than the bottom, and then just draw elements into the view for ever.

Not sure if there is a specific question there, beyond what happens when you draw outside of the bounds of a view, and where does the NSScroll fit into the pictures, and then maybe advice as to whether this is the smartest method of generating reports?

TIA

~j~



James Tichenor
VFX Supervisor
AIM: email@hidden
(07779) 256 103
http://www.lehopictures.com/the_joint/


_______________________________________________
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: Reports via NSView and NSString drawAtPoint:
      • From: Don Arbow <email@hidden>
  • Prev by Date: NSArrayController and the ContentArray Binding
  • Next by Date: remove undo actions for NSTextView
  • Previous by thread: Re: NSArrayController and the ContentArray Binding
  • Next by thread: Re: Reports via NSView and NSString drawAtPoint:
  • Index(es):
    • Date
    • Thread