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 / fig.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-02-16  |  2.5 KB  |  90 lines

  1. /* libwmf (<libwmf/fig.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. #ifndef LIBWMF_FIG_H
  21. #define LIBWMF_FIG_H
  22.  
  23. #include <stdio.h>
  24.  
  25. #include <libwmf/types.h>
  26.  
  27. #ifdef __cplusplus
  28. extern "C" {
  29. #endif
  30.  
  31. typedef struct _wmf_fig_t wmf_fig_t;
  32.  
  33. struct _wmf_fig_t
  34. {    /* other */
  35.  
  36.     void* fig_data;
  37.  
  38.     wmfD_Rect bbox;
  39.  
  40.     wmfStream* out;   /* Output stream */
  41.  
  42.     char* Title;
  43.     char* Creator;
  44.     char* Date;
  45.     char* For;
  46.  
  47.     unsigned int fig_x;
  48.     unsigned int fig_y;
  49.     unsigned int fig_width;  /* 0 = use wmf width  */
  50.     unsigned int fig_height; /* 0 = use wmf height */
  51.  
  52.     wmf_page_t format;
  53.  
  54.     unsigned int dpi;
  55.  
  56.     int depth;
  57.     int ddec;
  58.  
  59.     struct _wmf_fig_image /* fig device layer writes raster images as EPS */
  60.     {    void* context;
  61.         char* (*name) (void*); /* takes context; returns file name */
  62.     } image;
  63.  
  64.     unsigned long flags;
  65. };
  66.  
  67. #define WMF_FIG_LANDSCAPE (1 << 0)
  68.  
  69. #define WMF_FIG_IMAGE_PNG  (2) /* Default is to write raster sub-images as EPS */
  70. #define WMF_FIG_IMAGE_JPEG (6)
  71. #define WMF_FIG_ImageIsEPS(Z) (((Z)->flags & WMF_FIG_IMAGE_JPEG) == 0)
  72. #define WMF_FIG_ImageIsPNG(Z) (((Z)->flags & WMF_FIG_IMAGE_JPEG) == WMF_FIG_IMAGE_PNG )
  73. #define WMF_FIG_ImageIsJPG(Z) (((Z)->flags & WMF_FIG_IMAGE_JPEG) == WMF_FIG_IMAGE_JPEG)
  74.  
  75. #define WMF_FIG_SUPPORTS_PNG  (1 << 3) /* Set by wmf_api_create () if PNG  supported */
  76. #define WMF_FIG_SUPPORTS_JPEG (1 << 4) /* Set by wmf_api_create () if JPEG supported */
  77.  
  78. #define WMF_FIG_MAXPECT    (1 << 5) /* scale image to fit page */
  79. #define WMF_FIG_NO_MARGINS (1 << 6) /* remove margins when scaling */
  80.  
  81. #define WMF_FIG_GetData(Z) ((wmf_fig_t*)((Z)->device_data))
  82.  
  83. extern void wmf_fig_function (wmfAPI*);
  84.  
  85. #ifdef __cplusplus
  86. }
  87. #endif
  88.  
  89. #endif /* ! LIBWMF_FIG_H */
  90.