gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: issues generating icon - NSImageRep immutable ?


From: Riccardo Mottola
Subject: Re: issues generating icon - NSImageRep immutable ?
Date: Mon, 5 Jun 2023 23:04:40 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0 SeaMonkey/2.53.15

Hi,

Fred Kiefer wrote:
Sorry, I am completely lost here. Are you referring to line 301 or 351? I think 
that you expect the code starting in line 351 will be able to update the 
appIcon. This won’t work in GNUstep. When locking focus on an image we try to 
draw a representation of the image on an NSCachedImageRep. Your further drawing 
may also land in that image rep, but that will get overridden again. We may 
need to copy back changes from the NSCachedImageRep into the actual NSImage.

Line 301 has to go away (to test what I mean, it needs to be commented out, so to make GS=Mac). I refer to th drawing in line 351 (actual drawing is done inside draw_value() called at line 369).

Indeed I want to draw into the ImageRep once focus is locked, that's what Mac does.

When does it get overridden? when unlocking? Is there away to overcome it? e.g. by making a copy of the Image rep before unlocking?



As far as I remember this requires a complete rewrite of the image handling and 
would be only possible for a few of the current drawing backends. At least this 
is what I came up with years ago when I tried for the last time. Maybe it is 
better if I stay out of this and let you two come up with a better solution.

That sounds bad... but maybe your memories need to be refreshed, perhps we can find a way to work around it and maybe optimize it for certain backends.

Riccardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]