Institut de Robòtica i Informàtica Industrial
KRD Group

The CuikSuite Project

plot.h

Go to the documentation of this file.
00001 #ifndef PLOTH
00002 #define PLOTH 
00003 
00004 #include <stdio.h>
00005 
00020 /************************************************************************************/
00027 #define SOLID_LINE   0
00028 
00035 #define DASHED_LINE  1
00036 
00043 #define DOTTED_LINE 2
00044 /************************************************************************************/
00045 
00051 typedef struct {
00052   FILE *f; 
00053   double offset_x; 
00054   double offset_y; 
00055   unsigned int line_style; 
00056   unsigned int line_width; 
00057   int fill_color; 
00058   int pen_color; 
00059   int fill_intensity; 
00060   int depth; 
00062 } Tplot;
00063 
00072 void InitPlot(const char *name,Tplot *p);
00073 
00083 void SetLineWidth(unsigned int width,Tplot *p);
00095 void SetLineStyle(unsigned int style,Tplot *p);
00106 void SetOrigin(double offset_x,double offset_y,Tplot *p);
00123 void SetPenColor(int color,Tplot *p);
00140 void SetFillColor(int color,Tplot *p);
00141 
00152 void SetFillIntensity(unsigned int intensity,Tplot *p);
00162 void SetDepth(unsigned int depth,Tplot *p);
00163 
00174 void PlotCircle(double cx,double cy,double r,Tplot *p);
00186 void PlotRectangle(double x_left,double y_sup,double x_right,double y_inf,Tplot *p);
00200 void PlotTriangle(double x1,double y1,double x2,double y2,double x3,double y3,Tplot *p);
00201 
00213 void PlotLine(double x0,double y0,double x1,double y1,Tplot *p);
00225 void PlotArrow(double x0,double y0,double x1,double y1,Tplot *p);
00236 void PlotText(double x,double y,const char *text,Tplot *p);
00251 void PlotAxis(const char *nx,double min_x,double max_x,
00252               const char *ny,double min_y,double max_y,
00253               double step,
00254               Tplot *p);
00255 
00264 void ClosePlot(Tplot *p);
00265 
00266 #endif