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/



_______________________________________________
Bug-gnustep mailing list
Bug-gnustep@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnustep

Reply via email to