index.htmlMain Page    classes.htmlAlphabetical List    annotated.htmlData Structures    files.htmlFile List    functions.htmlData Fields    globals.htmlGlobals    canvas.h File Reference
Typedefs
typedef void * canvas_8h.html#a0wmfCanvas typedef enum canvas_8h.html#a24_wmf_canvas_arc_t  canvas_8h.html#a1wmf_canvas_arc_t Enumerations
enum  canvas_8h.html#a24_wmf_canvas_arc_t  {   
canvas_8h.html#a24a2wmf_CA_open  =  0, 
  
canvas_8h.html#a24a3wmf_CA_chord , 
  
canvas_8h.html#a24a4wmf_CA_pie  }
Functions
canvas_8h.html#a0wmfCanvas  * canvas_8h.html#a5wmf_canvas  ( types_8h.html#a22wmfAPI  *, unsigned short, unsigned short, unsigned short) unsigned char * canvas_8h.html#a6wmf_canvas_done  ( types_8h.html#a22wmfAPI  *, canvas_8h.html#a0wmfCanvas  *, unsigned char **, unsigned long *) int canvas_8h.html#a7wmf_canvas_set_pen  ( types_8h.html#a22wmfAPI  *, canvas_8h.html#a0wmfCanvas  *, unsigned short, unsigned short, unsigned short, unsigned short, ipa_8h.html#a0wmfRGB ) int canvas_8h.html#a8wmf_canvas_set_brush  ( types_8h.html#a22wmfAPI  *, canvas_8h.html#a0wmfCanvas  *, unsigned short, unsigned short, ipa_8h.html#a0wmfRGB ) int canvas_8h.html#a9wmf_canvas_set_font  ( types_8h.html#a22wmfAPI  *, canvas_8h.html#a0wmfCanvas  *, const char *, unsigned short, unsigned short, unsigned short, unsigned short, unsigned short, unsigned short, unsigned short, unsigned short) int canvas_8h.html#a10wmf_canvas_set_polyfill  ( types_8h.html#a22wmfAPI  *, canvas_8h.html#a0wmfCanvas  *, unsigned short) int canvas_8h.html#a11wmf_canvas_set_background  ( types_8h.html#a22wmfAPI  *, canvas_8h.html#a0wmfCanvas  *, unsigned short) int canvas_8h.html#a12wmf_canvas_set_bgcolor  ( types_8h.html#a22wmfAPI  *, canvas_8h.html#a0wmfCanvas  *, ipa_8h.html#a0wmfRGB ) int canvas_8h.html#a13wmf_canvas_set_textcolor  ( types_8h.html#a22wmfAPI  *, canvas_8h.html#a0wmfCanvas  *, ipa_8h.html#a0wmfRGB ) int canvas_8h.html#a14wmf_canvas_line  ( types_8h.html#a22wmfAPI  *, canvas_8h.html#a0wmfCanvas  *, unsigned short, unsigned short, unsigned short, unsigned short) int canvas_8h.html#a15wmf_canvas_roundrect  ( types_8h.html#a22wmfAPI  *, canvas_8h.html#a0wmfCanvas  *, unsigned short, unsigned short, unsigned short, unsigned short, unsigned short, unsigned short) int canvas_8h.html#a16wmf_canvas_rect  ( types_8h.html#a22wmfAPI  *, canvas_8h.html#a0wmfCanvas  *, unsigned short, unsigned short, unsigned short, unsigned short) int canvas_8h.html#a17wmf_canvas_ellipse  ( types_8h.html#a22wmfAPI  *, canvas_8h.html#a0wmfCanvas  *, unsigned short, unsigned short, unsigned short, unsigned short) int canvas_8h.html#a18wmf_canvas_arc  ( types_8h.html#a22wmfAPI  *, canvas_8h.html#a0wmfCanvas  *, unsigned short, unsigned short, unsigned short, unsigned short, unsigned short, unsigned short, unsigned short, unsigned short, canvas_8h.html#a1wmf_canvas_arc_t ) int canvas_8h.html#a19wmf_canvas_polyline  ( types_8h.html#a22wmfAPI  *, canvas_8h.html#a0wmfCanvas  *, unsigned short *, unsigned short *, unsigned short) int canvas_8h.html#a20wmf_canvas_polygon  ( types_8h.html#a22wmfAPI  *, canvas_8h.html#a0wmfCanvas  *, unsigned short *, unsigned short *, unsigned short) int canvas_8h.html#a21wmf_canvas_polygons  ( types_8h.html#a22wmfAPI  *, canvas_8h.html#a0wmfCanvas  *, unsigned short, unsigned short **, unsigned short **, unsigned short *) int canvas_8h.html#a22wmf_canvas_text  ( types_8h.html#a22wmfAPI  *, canvas_8h.html#a0wmfCanvas  *, unsigned short, unsigned short, const char *) int canvas_8h.html#a23wmf_canvas_bitmap  ( types_8h.html#a22wmfAPI  *, canvas_8h.html#a0wmfCanvas  *, unsigned short, unsigned short, unsigned short, unsigned short, const unsigned char *, unsigned long) Typedef Documentation
  
    
      
        
          
 typedef enum canvas_8h.html#a24_wmf_canvas_arc_t   wmf_canvas_arc_t
      
    
  
  
    
       
    
    
canvas_8h.html#a1wmf_canvas_arc_t  is the (enumeration) type used to distinguish arc type.       
  
    
      
        
          
 typedef void* wmfCanvas
      
    
  
  
    
       
    
    
    
  
Enumeration Type Documentation
  
    
      
        
          
 enum _wmf_canvas_arc_t
      
    
  
  
    
       
    
    
canvas_8h.html#a1wmf_canvas_arc_t  is the (enumeration) type used to distinguish arc type. Enumeration values: wmf_CA_open drawn arc segment (no fill) 
wmf_CA_chord start & end of arc joined together 
wmf_CA_pie start & end of arc joined to centre 
    
  
Function Documentation
  
    
      
        
          
 canvas_8h.html#a0wmfCanvas * wmf_canvas           
(           
types_8h.html#a22wmfAPI  *           
  API,         
        
          
          
          
unsigned short           
  width,         
        
          
          
          
unsigned short           
  height,         
        
          
          
          
unsigned short           
  dpi         
        
          
          
)           
        
      
    
  
  
    
       
    
    
Get a handle for creating a new metafile.
Parameters: API the API handle 
width width in 'dots' (a.k.a. 'twips'?) 
height height in 'dots' (a.k.a. 'twips'?) 
dpi dots per inch: one of 1440, 2880, 720, or 360
In case you want to use simple drawing routines to create your own metafile; all drawing commands expect a wmfCanvas handle as well as the API handle.
Returns: Returns 0 on failure. 
      
  
    
      
        
          
 int wmf_canvas_arc           
(           
types_8h.html#a22wmfAPI  *           
  API,         
        
          
          
          
canvas_8h.html#a0wmfCanvas  *           
  canvas,         
        
          
          
          
unsigned short           
  left,         
        
          
          
          
unsigned short           
  top,         
        
          
          
          
unsigned short           
  right,         
        
          
          
          
unsigned short           
  bottom,         
        
          
          
          
unsigned short           
  x1,         
        
          
          
          
unsigned short           
  y1,         
        
          
          
          
unsigned short           
  x2,         
        
          
          
          
unsigned short           
  y2,         
        
          
          
          
canvas_8h.html#a1wmf_canvas_arc_t            
  type         
        
          
          
)           
        
      
    
  
  
    
       
    
    
Draw an arc, open or fill as chord or pie.
Parameters: API the API handle 
canvas the Canvas handle for the metafile you are drawing to 
left lower x-coordinate 
top lower y-coordinate 
right upper x-coordinate 
bottom upper y-coordinate 
x1 x-coordinate of start of arc 
y1 y-coordinate of start of arc 
x2 x-coordinate of end of arc 
y2 y-coordinate of end of arc 
type arc type (open, chord or pie)
Draw an arc in the given bounding box, from (x1,y1) to (x2,y2). Coordinate origin is at the top-left, y increasing down.
Returns: Returns 0 on success. 
      
  
    
      
        
          
 int wmf_canvas_bitmap           
(           
types_8h.html#a22wmfAPI  *           
  API,         
        
          
          
          
canvas_8h.html#a0wmfCanvas  *           
  canvas,         
        
          
          
          
unsigned short           
  x,         
        
          
          
          
unsigned short           
  y,         
        
          
          
          
unsigned short           
  width,         
        
          
          
          
unsigned short           
  height,         
        
          
          
          
const unsigned char *           
  buffer,         
        
          
          
          
unsigned long           
  length         
        
          
          
)           
        
      
    
  
  
    
       
    
    
Place a bitmap.
Parameters: API the API handle 
canvas the Canvas handle for the metafile you are drawing to 
x x-coordinate of bitmap 
y y-coordinate of bitmap 
width (scaled) width of bitmap 
height (scaled) height of bitmap 
buffer buffer containing bitmap 
length length of buffer
Place a bitmap.
Returns: Returns 0 on success. 
      
  
    
      
        
          
 unsigned char* wmf_canvas_done           
(           
types_8h.html#a22wmfAPI  *           
  API,         
        
          
          
          
canvas_8h.html#a0wmfCanvas  *           
  canvas,         
        
          
          
          
unsigned char **           
  buffer,         
        
          
          
          
unsigned long *           
  length         
        
          
          
)           
        
      
    
  
  
    
       
    
    
Last command when creating a new metafile; returns the metafile you have drawn.
Parameters: API the API handle 
canvas the Canvas handle for the metafile you are drawing to 
buffer metafile buffer return 
length metafile length return
Cleans up memory etc. associated with the canvas process, except of course for the new metafile itself which gets returned.
Returns: Returns 0 on failure, *buffer on success 
      
  
    
      
        
          
 int wmf_canvas_ellipse           
(           
types_8h.html#a22wmfAPI  *           
  API,         
        
          
          
          
canvas_8h.html#a0wmfCanvas  *           
  canvas,         
        
          
          
          
unsigned short           
  left,         
        
          
          
          
unsigned short           
  top,         
        
          
          
          
unsigned short           
  right,         
        
          
          
          
unsigned short           
  bottom         
        
          
          
)           
        
      
    
  
  
    
       
    
    
Draw an ellipse.
Parameters: API the API handle 
canvas the Canvas handle for the metafile you are drawing to 
left lower x-coordinate 
top lower y-coordinate 
right upper x-coordinate 
bottom upper y-coordinate
Draw an ellipse in the given bounding box. Coordinate origin is at the top-left, y increasing down.
Returns: Returns 0 on success. 
      
  
    
      
        
          
 int wmf_canvas_line           
(           
types_8h.html#a22wmfAPI  *           
  API,         
        
          
          
          
canvas_8h.html#a0wmfCanvas  *           
  canvas,         
        
          
          
          
unsigned short           
  x1,         
        
          
          
          
unsigned short           
  y1,         
        
          
          
          
unsigned short           
  x2,         
        
          
          
          
unsigned short           
  y2         
        
          
          
)           
        
      
    
  
  
    
       
    
    
Draw a line.
Parameters: API the API handle 
canvas the Canvas handle for the metafile you are drawing to 
x1 x-coordinate of start point 
y1 y-coordinate of start point 
x2 x-coordinate of end point 
y2 y-coordinate of end point
Draw line from (x1,y1) to (x2,y2).
Returns: Returns 0 on success. 
      
  
    
      
        
          
 int wmf_canvas_polygon           
(           
types_8h.html#a22wmfAPI  *           
  API,         
        
          
          
          
canvas_8h.html#a0wmfCanvas  *           
  canvas,         
        
          
          
          
unsigned short *           
  x,         
        
          
          
          
unsigned short *           
  y,         
        
          
          
          
unsigned short           
  N         
        
          
          
)           
        
      
    
  
  
    
       
    
    
Draw a polygon.
Parameters: API the API handle 
canvas the Canvas handle for the metafile you are drawing to 
x array of N x-coordinates 
y array of N y-coordinates 
N number of points of polygon
Draw a polygon.
Returns: Returns 0 on success. 
      
  
    
      
        
          
 int wmf_canvas_polygons           
(           
types_8h.html#a22wmfAPI  *           
  API,         
        
          
          
          
canvas_8h.html#a0wmfCanvas  *           
  canvas,         
        
          
          
          
unsigned short           
  count,         
        
          
          
          
unsigned short **           
  x,         
        
          
          
          
unsigned short **           
  y,         
        
          
          
          
unsigned short *           
  N         
        
          
          
)           
        
      
    
  
  
    
       
    
    
Draw a set of polygons.
Parameters: API the API handle 
canvas the Canvas handle for the metafile you are drawing to 
count number of polygons [i = 0..count-1] 
x x[i] is array of N x-coordinates in ith polygon 
y y[i] is array of N y-coordinates in ith polygon 
N N[i] is number of points of ith polygon
Draw a set of polygons.
Returns: Returns 0 on success. 
      
  
    
      
        
          
 int wmf_canvas_polyline           
(           
types_8h.html#a22wmfAPI  *           
  API,         
        
          
          
          
canvas_8h.html#a0wmfCanvas  *           
  canvas,         
        
          
          
          
unsigned short *           
  x,         
        
          
          
          
unsigned short *           
  y,         
        
          
          
          
unsigned short           
  N         
        
          
          
)           
        
      
    
  
  
    
       
    
    
Draw a line connecting a sequence of points.
Parameters: API the API handle 
canvas the Canvas handle for the metafile you are drawing to 
x array of N x-coordinates 
y array of N y-coordinates 
N number of points on line
Draw a line connecting a sequence of points.
Returns: Returns 0 on success. 
      
  
    
      
        
          
 int wmf_canvas_rect           
(           
types_8h.html#a22wmfAPI  *           
  API,         
        
          
          
          
canvas_8h.html#a0wmfCanvas  *           
  canvas,         
        
          
          
          
unsigned short           
  left,         
        
          
          
          
unsigned short           
  top,         
        
          
          
          
unsigned short           
  right,         
        
          
          
          
unsigned short           
  bottom         
        
          
          
)           
        
      
    
  
  
    
       
    
    
Draw a rectangle.
Parameters: API the API handle 
canvas the Canvas handle for the metafile you are drawing to 
left lower x-coordinate 
top lower y-coordinate 
right upper x-coordinate 
bottom upper y-coordinate
Draw a rectangle. Coordinate origin is at the top-left, y increasing down.
Returns: Returns 0 on success. 
      
  
    
      
        
          
 int wmf_canvas_roundrect           
(           
types_8h.html#a22wmfAPI  *           
  API,         
        
          
          
          
canvas_8h.html#a0wmfCanvas  *           
  canvas,         
        
          
          
          
unsigned short           
  left,         
        
          
          
          
unsigned short           
  top,         
        
          
          
          
unsigned short           
  right,         
        
          
          
          
unsigned short           
  bottom,         
        
          
          
          
unsigned short           
  rx,         
        
          
          
          
unsigned short           
  ry         
        
          
          
)           
        
      
    
  
  
    
       
    
    
Draw a rounded rectangle.
Parameters: API the API handle 
canvas the Canvas handle for the metafile you are drawing to 
left lower x-coordinate 
top lower y-coordinate 
right upper x-coordinate 
bottom upper y-coordinate 
rx x-axis of corner ellipse 
ry y-axis of corner ellipse
Draw a rounded rectangle. Coordinate origin is at the top-left, y increasing down.
Returns: Returns 0 on success. 
      
  
    
      
        
          
 int wmf_canvas_set_background           
(           
types_8h.html#a22wmfAPI  *           
  API,         
        
          
          
          
canvas_8h.html#a0wmfCanvas  *           
  canvas,         
        
          
          
          
unsigned short           
  mode         
        
          
          
)           
        
      
    
  
  
    
       
    
    
Set background mode.
Parameters: API the API handle 
canvas the Canvas handle for the metafile you are drawing to 
mode one of TRANSPARENT or OPAQUE
Set background mode.
Returns: Returns 0 on success. 
      
  
    
      
        
          
 int wmf_canvas_set_bgcolor           
(           
types_8h.html#a22wmfAPI  *           
  API,         
        
          
          
          
canvas_8h.html#a0wmfCanvas  *           
  canvas,         
        
          
          
          
ipa_8h.html#a0wmfRGB            
  color         
        
          
          
)           
        
      
    
  
  
    
       
    
    
Set background color.
Parameters: API the API handle 
canvas the Canvas handle for the metafile you are drawing to 
color background color
Set background color.
Returns: Returns 0 on success. 
      
  
    
      
        
          
 int wmf_canvas_set_brush           
(           
types_8h.html#a22wmfAPI  *           
  API,         
        
          
          
          
canvas_8h.html#a0wmfCanvas  *           
  canvas,         
        
          
          
          
unsigned short           
  style,         
        
          
          
          
unsigned short           
  hatch,         
        
          
          
          
ipa_8h.html#a0wmfRGB            
  color         
        
          
          
)           
        
      
    
  
  
    
       
    
    
Change current brush style.
Parameters: API the API handle 
canvas the Canvas handle for the metafile you are drawing to 
style one of BS_SOLID, BS_NULL, or BS_HATCHED 
hatch one of HS_HORIZONTAL, HS_VERTICAL, HS_FDIAGONAL, HS_BDIAGONAL, HS_CROSS or HS_DIAGCROSS 
color stroke color
Brush settings to be used with next drawing command.
Returns: Returns 0 on success. 
      
  
    
      
        
          
 int wmf_canvas_set_font           
(           
types_8h.html#a22wmfAPI  *           
  API,         
        
          
          
          
canvas_8h.html#a0wmfCanvas  *           
  canvas,         
        
          
          
          
const char *           
  name,         
        
          
          
          
unsigned short           
  size,         
        
          
          
          
unsigned short           
  orient,         
        
          
          
          
unsigned short           
  weight,         
        
          
          
          
unsigned short           
  italic,         
        
          
          
          
unsigned short           
  strike,         
        
          
          
          
unsigned short           
  uscore,         
        
          
          
          
unsigned short           
  encode,         
        
          
          
          
unsigned short           
  pitch         
        
          
          
)           
        
      
    
  
  
    
       
    
    
Change current font.
Parameters: API the API handle 
canvas the Canvas handle for the metafile you are drawing to 
name font name 
size font height (in twips) 
orient text rotation in tenths of degrees 
weight 400 for normal text, 700 for bold 
italic 0 for normal text, 1 for oblique/italic 
strike 0 for normal text, 1 for strike-through 
uscore 0 for normal text, 1 for underscore (I think; and 2 for double uscore ??) 
encode encoding; 0 for most fonts, 2 for symbol fonts; presumably others... 
pitch italic angle; usually 0 (webdings), 16 (times), 32 (arial) or 48 (courier)
Font settings to be used with next drawing command.
Returns: Returns 0 on success. 
      
  
    
      
        
          
 int wmf_canvas_set_pen           
(           
types_8h.html#a22wmfAPI  *           
  API,         
        
          
          
          
canvas_8h.html#a0wmfCanvas  *           
  canvas,         
        
          
          
          
unsigned short           
  line,         
        
          
          
          
unsigned short           
  endcap,         
        
          
          
          
unsigned short           
  join,         
        
          
          
          
unsigned short           
  width,         
        
          
          
          
ipa_8h.html#a0wmfRGB            
  color         
        
          
          
)           
        
      
    
  
  
    
       
    
    
Change current pen style.
Parameters: API the API handle 
canvas the Canvas handle for the metafile you are drawing to 
line one of PS_SOLID, PS_DASH, PS_DOT, PS_DASHDOT, PS_DASHDOTDOT, PS_NULL, PS_INSIDEFRAME, PS_USERSTYLE, or PS_ALTERNATE 
endcap one of PS_ENDCAP_ROUND, PS_ENDCAP_SQUARE, or PS_ENDCAP_FLAT 
join one of PS_JOIN_ROUND, PS_JOIN_BEVEL, or PS_JOIN_MITER 
width stroke width 
color stroke color
Pen settings to be used with next drawing command.
Returns: Returns 0 on success. 
      
  
    
      
        
          
 int wmf_canvas_set_polyfill           
(           
types_8h.html#a22wmfAPI  *           
  API,         
        
          
          
          
canvas_8h.html#a0wmfCanvas  *           
  canvas,         
        
          
          
          
unsigned short           
  mode         
        
          
          
)           
        
      
    
  
  
    
       
    
    
Set polygon fill mode.
Parameters: API the API handle 
canvas the Canvas handle for the metafile you are drawing to 
mode one of ALTERNATE or WINDING
Set polygon fill mode.
Returns: Returns 0 on success. 
      
  
    
      
        
          
 int wmf_canvas_set_textcolor           
(           
types_8h.html#a22wmfAPI  *           
  API,         
        
          
          
          
canvas_8h.html#a0wmfCanvas  *           
  canvas,         
        
          
          
          
ipa_8h.html#a0wmfRGB            
  color         
        
          
          
)           
        
      
    
  
  
    
       
    
    
Set text color.
Parameters: API the API handle 
canvas the Canvas handle for the metafile you are drawing to 
color text color
Set text color.
Returns: Returns 0 on success. 
      
  
    
      
        
          
 int wmf_canvas_text           
(           
types_8h.html#a22wmfAPI  *           
  API,         
        
          
          
          
canvas_8h.html#a0wmfCanvas  *           
  canvas,         
        
          
          
          
unsigned short           
  x,         
        
          
          
          
unsigned short           
  y,         
        
          
          
          
const char *           
  str         
        
          
          
)           
        
      
    
  
  
    
       
    
    
Draw text.
Parameters: API the API handle 
canvas the Canvas handle for the metafile you are drawing to 
x x-coordinate of string 
y y-coordinate of string 
str the text string to be drawn
Draw text.
Returns: Returns 0 on success. 
      
Generated on Tue Dec 10 19:53:48 2002 for libwmf by
http://www.doxygen.org/index.htmldoxygen 1.2.18 