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

Group
 
 

bug #9413: NSImageCell drawInteriorWithFrame:inView: scaled bug

Submitter:  Riccardo Mottola <rmottola>
Submitted:  Mon 21 Jun 2004 09:03:57 PM UTC
   
 
Category:  Gui/AppKit Severity:  3 - Normal
Item Group:  Bug Status:  Fixed
Privacy:  Public Assigned to:  alexm
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group Member
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>
Group Member
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>
Group 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>
Group 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>
Group Member

 

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

Attach Files:
   
   
Comment:
   

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

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Follow 5 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2005-01-24 alexm StatusNone Fixed
    Assigned toNone alexm
    Open/ClosedOpen Closed
2005-01-23 alexm Attached File- Added NSImageCell_scaling.patch, #2102
2004-06-23 FredKiefer SummaryNSAffineTransform, scaleBy bug NSImageCell drawInteriorWithFrame:inView: scaled bug

Back to the top

Powered by Savane 3.13-d3ae.
Corresponding source code