From 7606bc7007575a70e48684e3f4ef8a8b2168bc60 Mon Sep 17 00:00:00 2001 From: Fred Kiefer Date: Sun, 29 May 2011 18:50:43 +0000 Subject: [PATCH] Use rint instead of round. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33195 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 5 +++++ Source/NSButtonCell.m | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index aa36cf658..7e96627ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-05-29 Fred Kiefer + + * Source/NSButtonCell.m (-drawImage:withFrame:inView:): Use rint + instead of round. + 2011-05-27 14:08 David Chisnall * libs/gui/trunk/Source/NSMenu.m: diff --git a/Source/NSButtonCell.m b/Source/NSButtonCell.m index a759cd7c3..3b95139cc 100644 --- a/Source/NSButtonCell.m +++ b/Source/NSButtonCell.m @@ -59,6 +59,8 @@ #include +DEFINE_RINT_IF_MISSING + typedef struct _GSButtonCellFlags { #if GS_WORDS_BIGENDIAN == 1 @@ -935,7 +937,7 @@ typedef struct _GSButtonCellFlags { position = [controlView convertPointToBase: position]; } - position = NSMakePoint(round(position.x), round(position.y)); + position = NSMakePoint(rint(position.x), rint(position.y)); if (controlView) { position = [controlView convertPointFromBase: position];