discuss-gnustep
[Top][All Lists]
Advanced

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

Re: drawing to NSImage off display


From: Omniscient
Subject: Re: drawing to NSImage off display
Date: Mon, 11 May 2009 23:41:19 -0700 (PDT)
User-agent: G2/1.0

On May 12, 5:33 am, Scott Christley <schrist...@mac.com> wrote:
> Hello Fred,
>
> I've filed bug # 26535 for this issue and attached a test app  
> illustrating the problems.  There is an issue with threads as the app  
> illustrates but there is also an issue with scaling.
>
> https://savannah.gnu.org/bugs/?func=detailitem&item_id=26535
>
> thanks
> Scott

A note, in back-art exposing events over that nonretained window
causes redraws, in back-cairo it doesn't.
while the behavior in back-art seems to be correct (beside that it's
not that important and probably is known), it didn't redraw correctly
since the test code do [image drawInRect: aRect fromRect: NSZeroRect
operation: NSCompositeSourceAtop fraction: 1.0];
when aRect is actually the exposed fraction of the view, so I think
you shouldn't use NSZeroRect.
Just a quick investigation for other issues and didn't relate to your
problems.

For the test case 3, just comment out the NSBitmapImageRep creation
and things seems to work a bit.
So may be you could use NSCachedImageRep instead for now? I tried
force create a cache rep
before adding NSBitmapImageRep (your code) and it turns out that image
has 2 cache bitmap
at the end of drawing, this shouldn't be correct.

and please take a look at
-lockFocusOnRepresentation:

      if (imageRep == nil)
        imageRep = [self bestRepresentationForDevice: nil];

      imageRep = [self _cacheForRep: imageRep];

imageRep got assigned twice.




reply via email to

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