wolffd@0: /* $Id: usershape.h,v 1.15 2009/06/03 01:10:52 ellson Exp $ $Revision: 1.15 $ */ wolffd@0: /* vim:set shiftwidth=4 ts=8: */ wolffd@0: wolffd@0: /********************************************************** wolffd@0: * This software is part of the graphviz package * wolffd@0: * http://www.graphviz.org/ * wolffd@0: * * wolffd@0: * Copyright (c) 1994-2004 AT&T Corp. * wolffd@0: * and is licensed under the * wolffd@0: * Common Public License, Version 1.0 * wolffd@0: * by AT&T Corp. * wolffd@0: * * wolffd@0: * Information and Software Systems Research * wolffd@0: * AT&T Research, Florham Park NJ * wolffd@0: **********************************************************/ wolffd@0: wolffd@0: #ifndef USERSHAPE_H wolffd@0: #define USERSHAPE_H wolffd@0: wolffd@0: #include "cdt.h" wolffd@0: wolffd@0: #ifdef __cplusplus wolffd@0: extern "C" { wolffd@0: #endif wolffd@0: wolffd@0: typedef enum { FT_NULL, wolffd@0: FT_BMP, FT_GIF, FT_PNG, FT_JPEG, wolffd@0: FT_PDF, FT_PS, FT_EPS, FT_SVG, FT_XML wolffd@0: } imagetype_t; wolffd@0: wolffd@0: typedef enum { wolffd@0: IMAGESCALE_FALSE, /* no image scaling */ wolffd@0: IMAGESCALE_TRUE, /* scale image to fit but keep aspect ratio */ wolffd@0: IMAGESCALE_WIDTH, /* scale image width to fit, keep height fixed */ wolffd@0: IMAGESCALE_HEIGHT, /* scale image height to fit, keep width fixed */ wolffd@0: IMAGESCALE_BOTH /* scale image to fit without regard for aspect ratio */ wolffd@0: } imagescale_t; wolffd@0: wolffd@0: typedef struct usershape_s usershape_t; wolffd@0: wolffd@0: struct usershape_s { wolffd@0: Dtlink_t link; wolffd@0: const char *name; wolffd@0: int macro_id; wolffd@0: boolean must_inline; wolffd@0: boolean nocache; wolffd@0: FILE *f; wolffd@0: imagetype_t type; wolffd@0: char *stringtype; wolffd@0: int x, y, w, h, dpi; wolffd@0: void *data; /* data loaded by a renderer */ wolffd@0: size_t datasize; /* size of data (if mmap'ed) */ wolffd@0: void (*datafree)(usershape_t *us); /* renderer's function for freeing data */ wolffd@0: }; wolffd@0: wolffd@0: #ifdef __cplusplus wolffd@0: } wolffd@0: #endif wolffd@0: #endif