home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / libwmf / canvas.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-02-16  |  4.4 KB  |  164 lines

  1. /* libwmf (<libwmf/canvas.h>): library for wmf conversion
  2.    Copyright (C) 2000 - various; see CREDITS, ChangeLog, and sources
  3.  
  4.    The libwmf Library is free software; you can redistribute it and/or
  5.    modify it under the terms of the GNU Library General Public License as
  6.    published by the Free Software Foundation; either version 2 of the
  7.    License, or (at your option) any later version.
  8.  
  9.    The libwmf Library is distributed in the hope that it will be useful,
  10.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  12.    Library General Public License for more details.
  13.  
  14.    You should have received a copy of the GNU Library General Public
  15.    License along with the libwmf Library; see the file COPYING.  If not,
  16.    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  17.    Boston, MA 02111-1307, USA.  */
  18.  
  19.  
  20. /* Interface Programmable des Applications ??
  21.  */
  22. #ifndef LIBWMF_CANVAS_H
  23. #define LIBWMF_CANVAS_H
  24.  
  25. #include <libwmf/ipa.h>
  26.  
  27. #ifdef __cplusplus
  28. extern "C" {
  29. #endif
  30.  
  31. typedef void * wmfCanvas;
  32.  
  33. /**
  34.  * Make a canvas for drawing to, to build a metafile in memory.
  35.  */
  36. extern wmfCanvas * wmf_canvas (wmfAPI*,unsigned short,unsigned short,unsigned short);
  37.  
  38. /**
  39.  * Final canvas call: finish off the metafile, free canvas etc., and return the metafile buffer.
  40.  */
  41. extern unsigned char * wmf_canvas_done (wmfAPI*,wmfCanvas*,unsigned char**,unsigned long*);
  42.  
  43. /**
  44.  * Set current pen (stroke) attributes.
  45.  */
  46. extern int wmf_canvas_set_pen (wmfAPI*,wmfCanvas*,
  47.                    unsigned short,unsigned short,unsigned short,
  48.                    unsigned short,wmfRGB);
  49.  
  50. /**
  51.  * Set current brush (fill) attributes.
  52.  */
  53. extern int wmf_canvas_set_brush (wmfAPI*,wmfCanvas*,unsigned short,unsigned short,wmfRGB);
  54.  
  55. /**
  56.  * Change current font.
  57.  */
  58. extern int wmf_canvas_set_font (wmfAPI*,wmfCanvas*,const char*,
  59.                 unsigned short,unsigned short,unsigned short,unsigned short,
  60.                 unsigned short,unsigned short,unsigned short,unsigned short);
  61.  
  62. /**
  63.  * Set polygon fill mode.
  64.  */
  65. extern int wmf_canvas_set_polyfill (wmfAPI*,wmfCanvas*,unsigned short);
  66.  
  67. /**
  68.  * Set background mode.
  69.  */
  70. extern int wmf_canvas_set_background (wmfAPI*,wmfCanvas*,unsigned short);
  71.  
  72. /**
  73.  * Set background color.
  74.  */
  75. extern int wmf_canvas_set_bgcolor (wmfAPI*,wmfCanvas*,wmfRGB);
  76.  
  77. /**
  78.  * Set text color.
  79.  */
  80. extern int wmf_canvas_set_textcolor (wmfAPI*,wmfCanvas*,wmfRGB);
  81.  
  82. /**
  83.  * Draw a line.
  84.  */
  85. extern int wmf_canvas_line (wmfAPI*,wmfCanvas*,
  86.                 unsigned short,unsigned short,
  87.                 unsigned short,unsigned short);
  88.  
  89. /**
  90.  * Draw a rounded rectangle.
  91.  */
  92. extern int wmf_canvas_roundrect (wmfAPI*,wmfCanvas*,
  93.                  unsigned short,unsigned short,
  94.                  unsigned short,unsigned short,
  95.                  unsigned short,unsigned short);
  96.  
  97. /**
  98.  * Draw a rectangle.
  99.  */
  100. extern int wmf_canvas_rect (wmfAPI*,wmfCanvas*,
  101.                 unsigned short,unsigned short,
  102.                 unsigned short,unsigned short);
  103.  
  104. /**
  105.  * Draw an ellipse in the given bounding box.
  106.  */
  107. extern int wmf_canvas_ellipse (wmfAPI*,wmfCanvas*,
  108.                    unsigned short,unsigned short,
  109.                    unsigned short,unsigned short);
  110.  
  111. /**
  112.  * \b wmf_canvas_arc_t is the (enumeration) type used to distinguish arc type.
  113.  */
  114. typedef enum _wmf_canvas_arc_t
  115. {
  116.   wmf_CA_open = 0, /**< drawn arc segment (no fill) */
  117.   wmf_CA_chord,    /**< start & end of arc joined together */
  118.   wmf_CA_pie       /**< start & end of arc joined to centre */
  119. } wmf_canvas_arc_t;
  120.  
  121. /**
  122.  * Draw an elliptic arc in the given bounding box.
  123.  */
  124. extern int wmf_canvas_arc (wmfAPI*,wmfCanvas*,
  125.                unsigned short,unsigned short,
  126.                unsigned short,unsigned short,
  127.                unsigned short,unsigned short,
  128.                unsigned short,unsigned short,wmf_canvas_arc_t);
  129.  
  130. /**
  131.  * Draw a line connecting a sequence of points.
  132.  */
  133. extern int wmf_canvas_polyline (wmfAPI*,wmfCanvas*,
  134.                 unsigned short*,unsigned short*,unsigned short);
  135.  
  136. /**
  137.  * Draw a polygon.
  138.  */
  139. extern int wmf_canvas_polygon (wmfAPI*,wmfCanvas*,
  140.                    unsigned short*,unsigned short*,unsigned short);
  141.  
  142. /**
  143.  * Draw a set of polygons.
  144.  */
  145. extern int wmf_canvas_polygons (wmfAPI*,wmfCanvas*,unsigned short,
  146.                 unsigned short**,unsigned short**,unsigned short*);
  147.  
  148. /**
  149.  * Draw text.
  150.  */
  151. extern int wmf_canvas_text (wmfAPI*,wmfCanvas*,unsigned short,unsigned short,const char*);
  152.  
  153. /**
  154.  * Place a bitmap.
  155.  */
  156. extern int wmf_canvas_bitmap (wmfAPI*,wmfCanvas*,unsigned short,unsigned short,
  157.                   unsigned short,unsigned short,const unsigned char*,unsigned long);
  158.  
  159. #ifdef __cplusplus
  160. }
  161. #endif
  162.  
  163. #endif /* ! LIBWMF_CANVAS_H */
  164.