mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 20:01:11 +00:00
* Source/NSButtonCell.m (-drawImage:withFrame:inView:): Align
the point at which the image is drawn to the nearest pixel. r32895 which reimplemented -[NSImage composite..] methods on top of -[NSImage draw...] methods means that drawing images with -compositeToPoint: no longer pixel-aligns the image automatically. The new behaviour matches Cocoa, however. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33002 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
5b0bfe8f6e
commit
ea05d7fa37
2 changed files with 22 additions and 0 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2011-05-07 Eric Wasylishen <ewasylishen@gmail.com>
|
||||
|
||||
* Source/NSButtonCell.m (-drawImage:withFrame:inView:): Align
|
||||
the point at which the image is drawn to the nearest pixel.
|
||||
|
||||
r32895 which reimplemented -[NSImage composite..] methods
|
||||
on top of -[NSImage draw...] methods means that drawing
|
||||
images with -compositeToPoint: no longer pixel-aligns
|
||||
the image automatically. The new behaviour matches
|
||||
Cocoa, however.
|
||||
|
||||
011-05-07 Eric Wasylishen <ewasylishen@gmail.com>
|
||||
|
||||
* Source/NSView.m (-convertPoint:toView:): Correct this
|
||||
|
|
|
@ -930,6 +930,17 @@ typedef struct _GSButtonCellFlags
|
|||
position.y += size.height;
|
||||
}
|
||||
|
||||
/* Pixel-align the drawing point */
|
||||
if (controlView)
|
||||
{
|
||||
position = [controlView convertPointToBase: position];
|
||||
}
|
||||
position = NSMakePoint(round(position.x), round(position.y));
|
||||
if (controlView)
|
||||
{
|
||||
position = [controlView convertPointFromBase: position];
|
||||
}
|
||||
|
||||
[[GSTheme theme] drawImage: imageToDisplay
|
||||
inButtonCell: self
|
||||
withFrame: cellFrame
|
||||
|
|
Loading…
Reference in a new issue