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

 
 

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

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: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Gregory John Casamento <gcasa>
Open/Closed: Closed

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

 

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 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):

 

 

Follow 9 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sun 03 Apr 2005 07:04:52 PM UTCgcasaStatusIn Progress=>Fixed
  Open/ClosedOpen=>Closed
Sun 03 Apr 2005 05:46:21 PM UTCgcasaStatusNone=>In Progress
  Assigned toNone=>gcasa
Sun 03 Apr 2005 05:43:25 PM UTCgcasaAttached File-=>Added NSCustomImageRep.m.patch, #2379
Sun 03 Apr 2005 05:42:09 PM UTCgcasaAttached File-=>Added nextgo-patchedgui.jpg, #2378
Sun 03 Apr 2005 04:23:51 PM UTCgcasaAttached File#2377=>Removed
Sun 03 Apr 2005 03:28:18 PM UTCgcasaAttached File#2377=>Removed
Sun 03 Apr 2005 03:04:53 PM UTCgcasaAttached File-=>Added NSImageRep.patch, #2377

Back to the top


Powered by Savane 3.1-cleanup1