From 5f2f86031bcc2a24c508745dd90e4e29cd1f5558 Mon Sep 17 00:00:00 2001 From: richard Date: Sat, 12 Dec 1998 09:53:54 +0000 Subject: [PATCH] Fixed error in the, deliberately wrong :-) code for rounding view sizes down to an integer number of points. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@3433 72102866-910b-0410-8b05-ffd578937521 --- Source/NSView.m | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Source/NSView.m b/Source/NSView.m index d6bcb18ff..02c17dbeb 100644 --- a/Source/NSView.m +++ b/Source/NSView.m @@ -747,6 +747,13 @@ PSMatrix* matrix; frame.origin.x, frame.origin.y, frame.size.width, frame.size.height); +/* FIXME + * The lines containing 'floor()' ensure that the frame sizes are an integer + * number of points. This is wrong - but makes for more efficient drawing + * on systems where 1pixel == 1point and all coordinates are integer point + * sizes. If and when we can draw efficiently without this 'feature' the + * lines should be removed. + */ if (changedOrigin) { frame.origin.x = floor(frame.origin.x); @@ -760,6 +767,8 @@ PSMatrix* matrix; frame.size.width = floor(frame.size.width); frame.size.height = floor(frame.size.height); + bounds.size.width = floor(bounds.size.width); + bounds.size.height = floor(bounds.size.height); sx = frame.size.width / bounds.size.width; sy = frame.size.height / bounds.size.height; [boundsMatrix scaleTo: sx : sy];