initWithFocusedViewRect
initWithFocusedViewRect
- Subject: initWithFocusedViewRect
- From: Lorenzo <email@hidden>
- Date: Mon, 11 Jul 2005 18:50:42 +0200
Hi
the method initWithFocusedViewRect:croppedRect
returns a NSImageRep with different size than the croppedRect size.
Why?
I do:
NSRect croppedRect = NSMakeRect( 0.0, 0.0, 1024, 128);
[textView lockFocus];
bitmap = [[NSBitmapImageRep alloc]
initWithFocusedViewRect:croppedRect];
NSLog(@"size: %d x %d",
(int)[bitmap size].width, (int)[bitmap size].height);
NSLog(@"Wide x High: %d x %d",
(int)[bitmap pixelsWide], (int)[bitmap pixelsHigh]);
[textView unlockFocus];
I get [bitmap size].height = 121 and not 128;
Also I get pixelsHigh = 121 and not 128;
Why?
If I set [bitmap setSize:croppedSize];
I get the proper size, but the image seems to be distorted.
Is anyone understanding what's going on with my image?
Best Regards
--
Lorenzo
email: email@hidden
_______________________________________________
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