summaryrefslogtreecommitdiff
path: root/src/fl_arci.cxx
diff options
context:
space:
mode:
authorengelsman <engelsman>2008-10-13 21:42:05 +0000
committerengelsman <engelsman>2008-10-13 21:42:05 +0000
commitde04c108f886dfdf8e4acffc0efd587ba5b77272 (patch)
tree110aaf3da82450a9ce5cf6ee55ca8baf7bb775a1 /src/fl_arci.cxx
parent8a20846803ea1d442c0eedc649cc6d4073bfa463 (diff)
copied more doxygen comments from drawing.dox back to source code
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6421 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/fl_arci.cxx')
-rw-r--r--src/fl_arci.cxx39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/fl_arci.cxx b/src/fl_arci.cxx
index 9cc64f6f3..69425554c 100644
--- a/src/fl_arci.cxx
+++ b/src/fl_arci.cxx
@@ -25,6 +25,11 @@
// http://www.fltk.org/str.php
//
+/**
+ \file fl_arci.cxx
+ \brief Utility functions for drawing circles using integers
+*/
+
// "integer" circle drawing functions. These draw the limited
// circle types provided by X and NT graphics. The advantage of
// these is that small ones draw quite nicely (probably due to stored
@@ -44,6 +49,28 @@
# include <config.h>
#endif
+/**
+ Draw ellipse sections using integer coordinates.
+
+ These functions match the rather limited circle drawing code provided by X
+ and WIN32. The advantage over using fl_arc with floating point coordinates
+ is that they are faster because they often use the hardware, and they draw
+ much nicer small circles, since the small sizes are often hard-coded bitmaps.
+
+ If a complete circle is drawn it will fit inside the passed bounding box.
+ The two angles are measured in degrees counterclockwise from 3'oclock and
+ are the starting and ending angle of the arc, a2 must be greater or equal
+ to a1.
+
+ fl_arc() draws a series of lines to approximate the arc. Notice that the
+ integer version of fl_arc() has a different number of arguments than the
+ double version fl_arc(double x, double y, double r, double start, double a)
+
+ \param[in] x,y,w,h bounding box of complete circle
+ \param[in] a1,a2 start and end angles of arc measured in degrees
+ counter-clockwise from 3 o'clock. a2 must be greater
+ than or equal to a1.
+*/
void fl_arc(int x,int y,int w,int h,double a1,double a2) {
if (w <= 0 || h <= 0) return;
#ifdef WIN32
@@ -78,6 +105,18 @@ void fl_arc(int x,int y,int w,int h,double a1,double a2) {
#endif
}
+/**
+ Draw filled ellipse sections using integer coordinates.
+
+ Like fl_arc, but fl_pie() draws a filled-in pie slice.
+ This slice may extend outside the line drawn by fl_arc;
+ to avoid this use w - 1 and h - 1.
+
+ \param[in] x,y,w,h bounding box of complete circle
+ \param[in] a1,a2 start and end angles of arc measured in degrees
+ counter-clockwise from 3 o'clock. a2 must be greater
+ than or equal to a1.
+*/
void fl_pie(int x,int y,int w,int h,double a1,double a2) {
if (w <= 0 || h <= 0) return;
#ifdef WIN32