pswrap.h

Go to the documentation of this file.
00001 /***********************************************************
00002  *
00003  * PSWRAP.H
00004  *
00005  * Postscript output library 
00006  * Copyright (c) 2002 Mike Montemerlo
00007  *
00008  ***********************************************************/
00009 
00010 
00012 // @{
00013 
00022 #ifndef CARMEN_PSWRAP_H
00023 #define CARMEN_PSWRAP_H
00024 
00025 #ifdef __cplusplus
00026 extern "C" {
00027 #endif
00028 
00029 #include <stdio.h>
00030 
00031 #define      CARMEN_GENERATE_PS         0
00032 #define      CARMEN_GENERATE_EPS        1
00033 
00034 #define      CARMEN_PS_BUTTCAP          0
00035 #define      CARMEN_PS_ROUNDCAP         1
00036 #define      CARMEN_PS_PROJECTINGCAP    2
00037 
00038 #define      CARMEN_PS_MITERJOIN        0
00039 #define      CARMEN_PS_ROUNDJOIN        1
00040 #define      CARMEN_PS_BEVELJOIN        2
00041 
00042 typedef struct {
00043   FILE *fp;
00044   float width, height;
00045   int border, eps;
00046   int page_count;
00047 } carmen_ps_doc_t, *carmen_ps_doc_p;
00048 
00049 carmen_ps_doc_p carmen_ps_open(char *filename, float width, float height, int eps);
00050 void carmen_ps_close(carmen_ps_doc_p doc);
00051 void carmen_ps_comment(carmen_ps_doc_p doc, char *comment);
00052 void carmen_ps_next_page(carmen_ps_doc_p doc);
00053 void carmen_ps_set_color(carmen_ps_doc_p doc, unsigned char r, unsigned char g,
00054                   unsigned char b);
00055 void carmen_ps_set_gray(carmen_ps_doc_p doc, unsigned char level);
00056 void carmen_ps_set_linewidth(carmen_ps_doc_p doc, float w);
00057 void carmen_ps_set_jointype(carmen_ps_doc_p doc, int join);
00058 void carmen_ps_set_captype(carmen_ps_doc_p doc, int cap);
00059 void carmen_ps_set_dash(carmen_ps_doc_p doc, int length);
00060 void carmen_ps_set_font(carmen_ps_doc_p doc, char *fontname, int size);
00061 
00062 void carmen_ps_draw_point(carmen_ps_doc_p doc, float x_1, float y_1);
00063 void carmen_ps_draw_points(carmen_ps_doc_p doc, float *x_1, float *y_1, int n);
00064 void carmen_ps_draw_line(carmen_ps_doc_p doc, float x_1, float y_1, float x_2, float y_2);
00065 void carmen_ps_draw_x(carmen_ps_doc_p doc, float x_1, float y_1, float r);
00066 void carmen_ps_draw_poly(carmen_ps_doc_p doc, int filled, float *x_1, 
00067                          float *y_1, int n, int closed);
00068 void carmen_ps_draw_circle(carmen_ps_doc_p doc, int filled, float x_1, 
00069                            float y_1, float r);
00070 void carmen_ps_draw_ellipse(carmen_ps_doc_p doc, int filled, float x_1, 
00071                             float y_1, float x_var, float xy_cov, float y_var, 
00072                             float k);
00073 void carmen_ps_draw_gaussian(carmen_ps_doc_p doc, float x, float y, 
00074                              float x_var, float xy_cov, float y_var, float k);
00075 void carmen_ps_draw_rectangle(carmen_ps_doc_p doc, int filled, float x_1, 
00076                               float y_1, float x_2, float y_2);
00077 void carmen_ps_draw_arc(carmen_ps_doc_p doc, float x_1, float y_1, float r, 
00078                         float start_angle, float delta);
00079 void carmen_ps_draw_wedge(carmen_ps_doc_p doc, int filled, float x_1, 
00080                           float y_1, float r, float start_angle, float delta);
00081 void carmen_ps_draw_text(carmen_ps_doc_p doc, char *str, float x_1, float y_1);
00082 void carmen_ps_draw_text_landscape(carmen_ps_doc_p doc, char *str, float x_1, 
00083                                    float y_1);
00084 void carmen_ps_draw_image(carmen_ps_doc_p doc, float dest_x, float dest_y, 
00085                           float dest_width, float dest_height, char *src_image,
00086                           int src_width, int src_height);
00087 void carmen_ps_draw_transformed_image(carmen_ps_doc_p doc, char *srt_image, 
00088                                       int src_width, int src_height, 
00089                                       float dest_x, float dest_y,
00090                                       float dest_theta, float dest_scale);
00091 
00092 #ifdef __cplusplus
00093 }
00094 #endif 
00095 
00096 #endif
00097 // @}

Generated on Wed Apr 5 18:34:18 2006 for CARMEN by  doxygen 1.4.4