Re: NSImage - drawInRect SnowLeopard issue
Re: NSImage - drawInRect SnowLeopard issue
- Subject: Re: NSImage - drawInRect SnowLeopard issue
- From: email@hidden
- Date: Thu, 10 Sep 2009 21:23:07 +0530 (IST)
- Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
- Importance: Normal
Hi Ken,
The targeted rectangle area is correct so I don't think it is an issue
with that.I have filed Bug ID# 7212266 and am trying to build a sample to
show the issue.
Thanks for your response,
Tresa
> Hi Tresa,
> This isn't enough information to tell what might be going wrong.
>
> Please file a bug, and give steps to reproduce in your app. (Or a
> reduction, but it sounds like you don't know how to make a reduction
> here.)
>
> I'm not aware of any problem that would cause this.
>
> You might try replacing your image drawing with NSRectFill of a color to
> make sure the drawing is targeted where you think it is.
>
> -ken
>
> On Wed, Sep 9, 2009 at 10:51 AM, <email@hidden> wrote:
>
>> Hello,
>> I seem to be running into an issue on Snow Leopard with NSImage.
>> Basically , I have a thumbnail kind of view , shown as a sheet , to
>> which I render the images read from the disk. The problem is that on
>> Snow Leopard the image shows up as blank whereas it renders fine on
>> Leopard and Tiger. My app is a Cocoa universal app running on an Intel
>> MacMini.The code goes like this ..
>>
>> - (void)drawRect:(NSRect)rect {
>>
>> [_timg drawInRect:imageRect fromRect:NSZeroRect
>> operation:NSCompositeSourceOver fraction:1.0f]; // _timg is an NSImage
>> /* Debug Code to see if the data in _timg is ok */
>> NSData* tiffData = [_timg TIFFRepresentation];
>> [tiffData writeToFile:[NSString stringWithFormat:@"Debug.tiff"]
>> atomically:NO];
>> }
>>
>> What I have noticed :
>> - If I comment the drawInRect call... the debug code to write to a file
>> generates a properly rendered image on disk.This implies that the data
>> is
>> not messed up due to any program issues
>> - If the call to drawInRect is included , the file rendered as well as
>> the
>> rendered image on screen is white..so the source image seems to be
>> getting
>> modified.
>> - Similar calls to drawInRect elsewhere in the app does not seem to have
>> this issue. The only noticeable difference seems to be that the code
>> which
>> is not working is invoked as a sheet.
>> - Changing the "operation" arguments to NSCompositeCopy etc does not
>> make
>> any difference.
>>
>> Please let me know any workarounds or possible solutions for this
>> problem.
>> Thanks in advance,
>> Tresa
>>
>> _______________________________________________
>>
>> 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