Re: Dividing NSView to subviews
Re: Dividing NSView to subviews
- Subject: Re: Dividing NSView to subviews
- From: Naresh Kongara <email@hidden>
- Date: Tue, 28 Apr 2009 15:59:42 +0530
Hi,
For larger views I'm not even getting the blur view, its giving some
garbage output... If the view needs to be divided into 20 to 25
images , each image of print rect size.
Thanks
NareshK
On Apr 27, 2009, at 11:42 AM, Peter N Lewis wrote:
On 27/04/2009, at 12:16 , Naresh Kongara wrote:
in the view drawing code i didn't changed any thing.
After preparing the view from which i need to get the images, i
just replaced the line
NSImage *img = [[[NSImage alloc] initWithData:[view
dataWithPDFInsideRect:sourceRect]] autorelease];
with
NSImage *img = [view imageFromRect:sourceRect];
The view drawing is same for both the cases,
but -(NSImage *)imageFromRect:(NSRect) is giving me a some what
blurred image...
My guess (and its only a guess because you haven't posted the
drawing code) is that the image is being drawn at a different size
to the original, and hence scaling.
cacheDisplayInRect will return a bit map image which will be blurry
if scaled.
dataWithPDFInsideRect will (potentially at least) return a PDF image
which will scale better.
Check your drawing code and ensure it is drawing the image at
exactly the same size as the original view bounds.
You can also try writing both images to a pdf and tiff and seeing
the differences.
Enjoy,
Peter.
--
Run macros from your iPhone with Keyboard Maestro Control!
or take a break with Derzle for your iPhone
Keyboard Maestro <http://www.keyboardmaestro.com/> Macros for your Mac
Aragom Space War <http://www.stairways.com/iphone/aragom> Don't get
killed!
Derzle <http://www.stairways.com/iphone/derzle> Enjoy a relaxing
puzzle.
<http://www.stairways.com/> <http://download.stairways.com/>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden