bugGNUstep - Bugs: bug #9413, NSImageCell...

 
 

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

bug #9413: NSImageCell drawInteriorWithFrame:inView: scaled bug

Submitted by:  Riccardo Mottola <rmottola>
Submitted on:  Mon 21 Jun 2004 09:03:57 PM UTC  
 
Category: Gui/AppKitSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: Alexander Malmberg <alexm>
Open/Closed: Closed

Mon 24 Jan 2005 12:01:17 AM UTC, comment #5:

Fixed in cvs. I've opened bug #11712 for some of the NSImage stuff related to this.

Module name: gnustep
Branch:
Changes by: Alexander Malmberg <alexm(at)savannah.gnu.org> 05/01/23 23:45:20

Modified files:
core/gui : ChangeLog
core/gui/Source: NSImageCell.m

Log message:
2005-01-24 00:48 Alexander Malmberg <alexander(at)malmberg.org>

  • Source/NSImageCell.m (-drawInteriorWithFrame:inView:): Draw

the image using the right size, but don't scale it. Work around
bug #11712.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnustep/gnustep/core/gui/ChangeLog.diff?tr1=1.2461&tr2=1.2462&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnustep/gnustep/core/gui/Source/NSImageCell.m.diff?tr1=1.21&tr2=1.22&r1=text&r2=text

Alexander Malmberg <alexm>
Project MemberIn charge of this item.
Sun 23 Jan 2005 08:34:41 PM UTC, comment #4:

The NSImageCell bits would be dead easy if only NSImage wasn't so broken. Anyway, I've attached my local NSImageCell changes to fix this, cleaned up (I hope) so that it'll work with an unmodified NSImage.m. Thus, the image drawing is a bit hackish. However, I believe NSImageCell is completely fixed by this patch (i.e. there's no way to trigger the NSImage bugs using NSImageCell).

I've asked Riccardo to test this. If it works, I'll commit the patch, close this bug, and open a new bug for the remaining NSImage issues (along with a note that this part NSImageCell.m should be cleaned up when that bug is fixed).

Alexander Malmberg <alexm>
Project MemberIn charge of this item.
Sun 23 Jan 2005 07:45:55 PM UTC, comment #3:

You are right, we should fix this as soon as possible.
At the time when the problem was reported I suggested to just reset the size of the image at the end of the [NSImageCell drawInteriorWithFrame:] method, which is just a heck to undo the hack of changing the size in the same method. Alexander said that he has a better solution, I am still expecting him to submit this, but if this take another half year, we could do the hack in the meantime.

Fred Kiefer <FredKiefer>
Project Member
Sat 22 Jan 2005 11:10:01 AM UTC, comment #2:

I've tested this in PRICE and successfully reproduced it under GNUstep.

I have also compared the functionality with OSX. On OSX it works correctly.

It appears as thought the reduction is cumulative. That is to say... it seems as though as the image is reduced it's reduced based on the currently reduced size which makes the result smaller than it should be.

This bug should be addressed.

GJC

Anonymous
Wed 23 Jun 2004 11:52:10 PM UTC, comment #1:

Changed the title of this bug report which was suggesting that the bug was in the NSAffineTransform scaleBy method, where it is in the drawing code, which changes the size of the image. See the comments that Alexander and I did post to the mailing list even before this report was submitted.

If the method on NSAffineTransform would be wrong this could be shown by a simple test case just doing the math. If you still believe this is the case, send an example for this.

Fred Kiefer <FredKiefer>
Project Member
Mon 21 Jun 2004 09:03:57 PM UTC, original submission:

The above method is used in PRICE (http://price.sf.net) to zoom in and out of an image. While this works fine on OS-X the beavior on GNUstep is broken:
Scaling an image to 50% works. But rescaling it to 50% makes it actualy lok at 25% and scaling it to 100% doesn't pop it back but leaves it as is.

Riccardo Mottola <rmottola>
Project Member

 

Attached Files
file #2408:  NSImageCell_scaling.patch added by alexm (2KiB - text/x-patch)

 

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 5 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Mon 24 Jan 2005 12:01:17 AM UTCalexmStatusNone=>Fixed
  Assigned toNone=>alexm
  Open/ClosedOpen=>Closed
Sun 23 Jan 2005 08:34:41 PM UTCalexmAttached File-=>Added NSImageCell_scaling.patch, #2102
Wed 23 Jun 2004 11:52:10 PM UTCFredKieferSummaryNSAffineTransform, scaleBy bug=>NSImageCell drawInteriorWithFrame:inView: scaled bug

Back to the top


Powered by Savane 3.1-cleanup1