mirror of
https://github.com/fltk/fltk.git
synced 2026-06-06 00:22:42 +08:00
Fix teeth on wide arcs.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2184 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
CHANGES IN FLTK 1.1.0rc2
|
||||||
|
|
||||||
|
- Wide arcs would draw with "teeth".
|
||||||
|
- The preferences demo included Fl/Fl_Preferences.H
|
||||||
|
instead of FL/Fl_Preferences.H.
|
||||||
|
|
||||||
|
|
||||||
CHANGES IN FLTK 1.1.0rc1
|
CHANGES IN FLTK 1.1.0rc1
|
||||||
|
|
||||||
- The fl_file_chooser() and fl_dir_chooser() functions
|
- The fl_file_chooser() and fl_dir_chooser() functions
|
||||||
|
|||||||
+5
-2
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: fl_arc.cxx,v 1.4.2.3.2.2 2002/01/01 15:11:31 easysw Exp $"
|
// "$Id: fl_arc.cxx,v 1.4.2.3.2.3 2002/05/03 01:18:15 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Arc functions for the Fast Light Tool Kit (FLTK).
|
// Arc functions for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
#include <FL/fl_draw.H>
|
#include <FL/fl_draw.H>
|
||||||
#include <FL/math.h>
|
#include <FL/math.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
void fl_arc(double x, double y, double r, double start, double end) {
|
void fl_arc(double x, double y, double r, double start, double end) {
|
||||||
|
|
||||||
@@ -49,7 +50,9 @@ void fl_arc(double x, double y, double r, double start, double end) {
|
|||||||
if (r2 < r1) r1 = r2;
|
if (r2 < r1) r1 = r2;
|
||||||
n = int(sqrt(r1)*.841471);
|
n = int(sqrt(r1)*.841471);
|
||||||
if (n < 2) n = 2;
|
if (n < 2) n = 2;
|
||||||
|
if (n > 60) n = 60;
|
||||||
}
|
}
|
||||||
|
printf("n = %d\n", n);
|
||||||
double epsilon = 1.0/n;
|
double epsilon = 1.0/n;
|
||||||
double E = end*(M_PI/180);
|
double E = end*(M_PI/180);
|
||||||
int i = int((E-A)*n);
|
int i = int((E-A)*n);
|
||||||
@@ -73,5 +76,5 @@ void fl_circle(double x,double y,double r) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: fl_arc.cxx,v 1.4.2.3.2.2 2002/01/01 15:11:31 easysw Exp $".
|
// End of "$Id: fl_arc.cxx,v 1.4.2.3.2.3 2002/05/03 01:18:15 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user