mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 20:40:47 +00:00
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
This commit is contained in:
parent
1c644b22df
commit
5f2f86031b
1 changed files with 9 additions and 0 deletions
|
@ -747,6 +747,13 @@ PSMatrix* matrix;
|
||||||
frame.origin.x, frame.origin.y,
|
frame.origin.x, frame.origin.y,
|
||||||
frame.size.width, frame.size.height);
|
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)
|
if (changedOrigin)
|
||||||
{
|
{
|
||||||
frame.origin.x = floor(frame.origin.x);
|
frame.origin.x = floor(frame.origin.x);
|
||||||
|
@ -760,6 +767,8 @@ PSMatrix* matrix;
|
||||||
|
|
||||||
frame.size.width = floor(frame.size.width);
|
frame.size.width = floor(frame.size.width);
|
||||||
frame.size.height = floor(frame.size.height);
|
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;
|
sx = frame.size.width / bounds.size.width;
|
||||||
sy = frame.size.height / bounds.size.height;
|
sy = frame.size.height / bounds.size.height;
|
||||||
[boundsMatrix scaleTo: sx : sy];
|
[boundsMatrix scaleTo: sx : sy];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue