bugGNUstep - Bugs: bug #12412, NSImageRep's drawAtPoint: and...

 
 

bug #12412: NSImageRep's drawAtPoint: and drawInRect: shouldn't assume zero size if delegate exist.

Submitted by:  None
Submitted on:  Mon 21 Mar 2005 07:04:38 PM UTC  
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  Gregory John Casamento <gcasa>
Open/Closed:  Closed

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 03 Apr 2005 07:04:52 PM UTC, comment #5: 

Committed.   Please make any comments you like or suggest improvements to the code in CVS.  Thanks. GJC

Gregory John Casamento <gcasa>
Project AdministratorIn charge of this item.
Sun 03 Apr 2005 05:43:25 PM UTC, comment #4: 

The current patch is attached.  Please let me know if you think it's correct or can be improved.

Thanks, GJC

Gregory John Casamento <gcasa>
Project AdministratorIn charge of this item.
Sun 03 Apr 2005 05:42:09 PM UTC, comment #3: 

The fix appears to be to override the drawInRect: and drawAtpoint: methods in NSCustomImageRep to achieve the correct behavior.  It also appears as though, per documentation, that the NSImageRep behavior is correct.

Gregory John Casamento <gcasa>
Project AdministratorIn charge of this item.
Sun 03 Apr 2005 03:04:53 PM UTC, comment #2: 

Attached is a patch which shows the change made to correct this issue.  GJC

Gregory John Casamento <gcasa>
Project AdministratorIn charge of this item.
Sun 03 Apr 2005 03:00:03 PM UTC, comment #1: 

OPENSTEP4.2/Mach does not seem to make the assumption that drawAtPoint:/drawAtRect: should return NO, if the size is zero. 

When testing this using the NeXTGo application in the gap project (which also compiles and runs on OPENSTEP) on OPENSTEP the application renders it's images just fine.  NeXTGo utilizes a NSCustomImageRep and draw the images into the object using postscript calls.

Currently, under GNUstep, neither the board, nor the pieces get rendered properly. I am going to do some further testing with other apps and come up with a minimal test case.  Barring any objections, I'm going to commit the change to gui if all goes well.

Please see the NeXTGo application at:
https://savannah.nongnu.org/projects/gap

GJC

Gregory John Casamento <gcasa>
Project AdministratorIn charge of this item.
Mon 21 Mar 2005 07:04:38 PM UTC, original submission:  

NSImageRep's drawAtPoint: and drawInRect: shouldn't assume zero size if delegate exist.

 if (_size.width == 0 && _size.height == 0)
    return NO;

at the beginning of both method since images may be initiated w/o size information.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #2837:  NSCustomImageRep.m.patch added by gcasa (2KiB - application/octet-stream - The patch to NSCustomImageRep.)
file #2831:  nextgo-patchedgui.jpg added by gcasa (215KiB - image/jpeg - NeXTGo with the fix.)

 

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 add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

 

 

Follow 9 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2005-04-03 gcasa StatusIn Progress => Fixed
    Open/ClosedOpen => Closed
2005-04-03 gcasa StatusNone => In Progress
    Assigned toNone => gcasa
2005-04-03 gcasa Attached File- => Added NSCustomImageRep.m.patch, #2379
2005-04-03 gcasa Attached File- => Added nextgo-patchedgui.jpg, #2378
2005-04-03 gcasa Attached File#2377 => Removed
2005-04-03 gcasa Attached File#2377 => Removed
2005-04-03 gcasa Attached File- => Added NSImageRep.patch, #2377

Back to the top


Powered by Savane 3.6