diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-01-01 13:11:29 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-01-01 13:11:29 +0000 |
| commit | f9770db21fabc7785627092c52afb0d88f43089f (patch) | |
| tree | 7b48f59252190d4c24b8b67cee8ccac66ca4f987 /src/fl_vertex.cxx | |
| parent | 988bc9d95f1a4f5b06262fe9b4de9466ab2950f5 (diff) | |
Use rint() for some more rounding of vertices.
Add fl_parse_color() to X11 version, too, and use it instead of XParseColor
in the image handling code.
Move the default color stuff in the plastic scheme to the MacOS
get_system_colors(), and apply the background color to the tile image.
More fixes for test makefile.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1901 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/fl_vertex.cxx')
| -rw-r--r-- | src/fl_vertex.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/fl_vertex.cxx b/src/fl_vertex.cxx index fbd80525c..2a1cc5b29 100644 --- a/src/fl_vertex.cxx +++ b/src/fl_vertex.cxx @@ -1,5 +1,5 @@ // -// "$Id: fl_vertex.cxx,v 1.5.2.3.2.3 2001/12/28 21:57:41 easysw Exp $" +// "$Id: fl_vertex.cxx,v 1.5.2.3.2.4 2002/01/01 13:11:29 easysw Exp $" // // Portable drawing routines for the Fast Light Tool Kit (FLTK). // @@ -228,10 +228,10 @@ void fl_circle(double x, double y,double r) { double yt = fl_transform_y(x,y); double rx = r * (m.c ? sqrt(m.a*m.a+m.c*m.c) : fabs(m.a)); double ry = r * (m.b ? sqrt(m.b*m.b+m.d*m.d) : fabs(m.d)); - int llx = int(xt-rx+.5); - int w = int(xt+rx+.5)-llx; - int lly = int(yt-ry+.5); - int h = int(yt+ry+.5)-lly; + int llx = (int)rint(xt-rx); + int w = (int)rint(xt+rx)-llx; + int lly = (int)rint(yt-ry); + int h = (int)rint(yt+ry)-lly; #ifdef WIN32 if (what==POLYGON) { SelectObject(fl_gc, fl_brush()); @@ -248,5 +248,5 @@ void fl_circle(double x, double y,double r) { } // -// End of "$Id: fl_vertex.cxx,v 1.5.2.3.2.3 2001/12/28 21:57:41 easysw Exp $". +// End of "$Id: fl_vertex.cxx,v 1.5.2.3.2.4 2002/01/01 13:11:29 easysw Exp $". // |
