diff options
author | Johannes Hofmann <johannes.hofmann@gmx.de> | 2004-11-10 17:49:08 +0000 |
---|---|---|
committer | Johannes Hofmann <johannes.hofmann@gmx.de> | 2004-11-10 17:49:08 +0000 |
commit | 9583092a2166fe6899c616dd2f52b73dba8d34bc (patch) | |
tree | 7272674192a6ba394a1138dba06d1537d973f352 /src/PSEditWidget.cxx | |
parent | e20e866ffce0d68c9118bdb47df5fe1c8b9cfd48 (diff) |
get rid of those stupid floating point computations.
get rid of those stupid floating point computations.
Diffstat (limited to 'src/PSEditWidget.cxx')
-rw-r--r-- | src/PSEditWidget.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/PSEditWidget.cxx b/src/PSEditWidget.cxx index 034be00..572f010 100644 --- a/src/PSEditWidget.cxx +++ b/src/PSEditWidget.cxx @@ -1,5 +1,5 @@ // -// "$Id: PSEditWidget.cxx,v 1.29 2004/11/10 18:32:59 hofmann Exp $" +// "$Id: PSEditWidget.cxx,v 1.30 2004/11/10 18:49:08 hofmann Exp $" // // PSEditWidget routines. // @@ -339,17 +339,17 @@ int PSEditWidget::bb_h(PSEditText *t) { int PSEditWidget::ps_to_display_x(int x1) { - return (int) ((float) x1 * xdpi / 72.0); + return (x1 * xdpi) / 72; } int PSEditWidget::ps_to_display_y(int y1) { - return (int) ((float) (paper_y - y1) * xdpi / 72.0); + return ((paper_y - y1) * xdpi) / 72; } int PSEditWidget::ps_x(int x1) { - return (int) ((float) x1 * 72.0 / xdpi); + return (x1 * 72) / xdpi; } int PSEditWidget::ps_y(int y1) { - return paper_y - (int)((float) y1 * 72.0 / ydpi); + return paper_y - (y1 * 72) / ydpi; } |