Question regarding drawing NSImages
Question regarding drawing NSImages
- Subject: Question regarding drawing NSImages
- From: Ben Mackin <email@hidden>
- Date: Mon, 17 Jun 2002 17:51:30 -0700
Ok, I am a bit confused on how to draw NSImages after reading through the
NSImage docs.
I have a multipage PDF file (bodyPDF) loaded into an NSImage, and a single
page PDF file (coverPDF) loaded into an NSImage. I want to "draw" these two
NSImages into the same view (or is it rect) so that I can then write it out
as one pdf file to disk. I have gotten everything figured out except fo rthe
actual "drawing" step. Looking at the NSImage docs I see the following:
- (void)compositeToPoint:(NSPoint)aPoint
operation:(NSCompositingOperation)op
- (void)drawAtPoint:(NSPoint)point fromRect:(NSRect)srcRect
operation:(NSCompositingOperation)op fraction:(float)delta
Which one do I want to be using here, composite of draw? And what is the
point I would be drawing to? Do I need to know that after I draw the first
NSImage (coverPDF), I need to know the lower left hand point, and that is
the starting point for my next NSImage (bodyPDF)?
My next issue is that the number of pages and sizes (could be letter, legal
or A4) are varibale, so I don't know how big of a rect to setup (do I need
to setup a rect large enough to hold all my pages, or just the front most?)
I understand how to extract the number of pages, and page sizes, just not
sure if I need to make the rect that will be "drawn" into large enough to
hold them all.
I hope something up there made some sense and someone can help me out a bit.
Thanks for the help,
Ben
_______________________________________________
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.