/misc/src/release/graphviz-2.18-1/src/graphviz-2.18/lib/common/usershape.h

Go to the documentation of this file.
00001 /* $Id: usershape.h,v 1.11 2008/01/03 23:24:28 ellson Exp $ $Revision: 1.11 $ */
00002 /* vim:set shiftwidth=4 ts=8: */
00003 
00004 /**********************************************************
00005 *      This software is part of the graphviz package      *
00006 *                http://www.graphviz.org/                 *
00007 *                                                         *
00008 *            Copyright (c) 1994-2004 AT&T Corp.           *
00009 *                and is licensed under the                *
00010 *            Common Public License, Version 1.0           *
00011 *                      by AT&T Corp.                      *
00012 *                                                         *
00013 *        Information and Software Systems Research        *
00014 *              AT&T Research, Florham Park NJ             *
00015 **********************************************************/
00016 
00017 #ifndef USERSHAPE_H
00018 #define USERSHAPE_H
00019 
00020 #include "cdt.h"
00021 
00022 #ifdef __cplusplus
00023 extern "C" {
00024 #endif
00025 
00026     typedef enum { FT_NULL,
00027                 FT_BMP, FT_GIF, FT_PNG, FT_JPEG,
00028                 FT_PDF, FT_PS, FT_EPS, FT_SVG, FT_XML
00029     } imagetype_t;
00030 
00031     typedef enum {
00032         IMAGESCALE_FALSE,  /* no image scaling */
00033         IMAGESCALE_TRUE,   /* scale image to fit but keep aspect ratio */
00034         IMAGESCALE_WIDTH,  /* scale image width to fit, keep height fixed */
00035         IMAGESCALE_HEIGHT, /* scale image height to fit, keep width fixed */
00036         IMAGESCALE_BOTH    /* scale image to fit without regard for aspect ratio */
00037     } imagescale_t;
00038 
00039     typedef struct usershape_s usershape_t;
00040 
00041     struct usershape_s {
00042         Dtlink_t link;
00043         char *name;
00044         int macro_id;
00045         boolean must_inline;
00046         FILE *f;
00047         imagetype_t type;
00048         char *stringtype;
00049         int x, y, w, h, dpi;
00050         void *data;                   /* data loaded by a renderer */
00051         size_t datasize;              /* size of data (if mmap'ed) */
00052         void (*datafree)(usershape_t *us); /* renderer's function for freeing data */
00053     };
00054 
00055 #ifdef __cplusplus
00056 }
00057 #endif
00058 #endif

Generated on Mon Mar 31 19:03:25 2008 for Graphviz by  doxygen 1.5.1