bug-gnustep
[Top][All Lists]
Advanced

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

[bug #15837] Locking focus on NSImage with Bitmap image rep does not wor


From: Stefan Urbanek
Subject: [bug #15837] Locking focus on NSImage with Bitmap image rep does not work
Date: Tue, 21 Feb 2006 09:40:30 +0100
User-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 2.0.50727; InfoPath.1)

URL:
  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=15837>

                 Summary: Locking focus on NSImage with Bitmap image rep does
not work
                 Project: GNUstep
            Submitted by: stefanu
            Submitted on: Tue 02/21/06 at 09:40
                Category: Gui/AppKit
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open

    _______________________________________________________

Details:

Following example does not work:

/* Create bitmap image representation */
   rep = [[NSBitmapImageRep alloc]
           initWithBitmapDataPlanes: nil
           pixelsWide: size.width pixelsHigh: size.height
           bitsPerSample: 8 samplesPerPixel: 3
           hasAlpha: NO isPlanar: NO
           colorSpaceName: NSCalibratedRGBColorSpace
           bytesPerRow: 0 bitsPerPixel: 24];

   image = [[NSImage alloc] initWithSize: size];
   [image addRepresentation: rep];

/* Draw image */

   [image lockFocusOnRepresentation:rep];
   [[NSColor blackColor] set];
   [NSBezierPath fillRect:NSMakeRect(10,10,80,80)];
   [image unlockFocus];

at this point the NSBitmapImageRepresentation (rep) stays unchanged, as all
changes were made to cached representation created by
lockFocusOnRepresentation: and were not flushed by [image unlockFocus].

I set severity of this problem to "Normal", however I would set it to
"Blocking" as it is blocking to applications wanting to draw inside a bitmap
image. There is no workaround for the problem. Not even if you want
transparent bitmap with incremental changes.







    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=15837>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

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