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