bugGNUstep - Bugs: bug #15837, Locking focus on NSImage with...

 
 

You are not allowed to post comments on this tracker with your current authentification level.

bug #15837: Locking focus on NSImage with Bitmap image rep does not work

Submitted by:  Stefan Urbanek <stefanu>
Submitted on:  Tue 21 Feb 2006 08:40:29 AM UTC  
 
Category: Gui/AppKitSeverity: 3 - Normal
Item Group: BugStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Tue 21 Feb 2006 08:40:29 AM UTC, original submission:

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.

Stefan Urbanek <stefanu>
Project Member

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

No Changes Have Been Made to This Item

Back to the top


Powered by Savane 3.1-cleanup