annotate toolboxes/graph_visualisation/include/graphviz/usershape.h @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
rev   line source
wolffd@0 1 /* $Id: usershape.h,v 1.15 2009/06/03 01:10:52 ellson Exp $ $Revision: 1.15 $ */
wolffd@0 2 /* vim:set shiftwidth=4 ts=8: */
wolffd@0 3
wolffd@0 4 /**********************************************************
wolffd@0 5 * This software is part of the graphviz package *
wolffd@0 6 * http://www.graphviz.org/ *
wolffd@0 7 * *
wolffd@0 8 * Copyright (c) 1994-2004 AT&T Corp. *
wolffd@0 9 * and is licensed under the *
wolffd@0 10 * Common Public License, Version 1.0 *
wolffd@0 11 * by AT&T Corp. *
wolffd@0 12 * *
wolffd@0 13 * Information and Software Systems Research *
wolffd@0 14 * AT&T Research, Florham Park NJ *
wolffd@0 15 **********************************************************/
wolffd@0 16
wolffd@0 17 #ifndef USERSHAPE_H
wolffd@0 18 #define USERSHAPE_H
wolffd@0 19
wolffd@0 20 #include "cdt.h"
wolffd@0 21
wolffd@0 22 #ifdef __cplusplus
wolffd@0 23 extern "C" {
wolffd@0 24 #endif
wolffd@0 25
wolffd@0 26 typedef enum { FT_NULL,
wolffd@0 27 FT_BMP, FT_GIF, FT_PNG, FT_JPEG,
wolffd@0 28 FT_PDF, FT_PS, FT_EPS, FT_SVG, FT_XML
wolffd@0 29 } imagetype_t;
wolffd@0 30
wolffd@0 31 typedef enum {
wolffd@0 32 IMAGESCALE_FALSE, /* no image scaling */
wolffd@0 33 IMAGESCALE_TRUE, /* scale image to fit but keep aspect ratio */
wolffd@0 34 IMAGESCALE_WIDTH, /* scale image width to fit, keep height fixed */
wolffd@0 35 IMAGESCALE_HEIGHT, /* scale image height to fit, keep width fixed */
wolffd@0 36 IMAGESCALE_BOTH /* scale image to fit without regard for aspect ratio */
wolffd@0 37 } imagescale_t;
wolffd@0 38
wolffd@0 39 typedef struct usershape_s usershape_t;
wolffd@0 40
wolffd@0 41 struct usershape_s {
wolffd@0 42 Dtlink_t link;
wolffd@0 43 const char *name;
wolffd@0 44 int macro_id;
wolffd@0 45 boolean must_inline;
wolffd@0 46 boolean nocache;
wolffd@0 47 FILE *f;
wolffd@0 48 imagetype_t type;
wolffd@0 49 char *stringtype;
wolffd@0 50 int x, y, w, h, dpi;
wolffd@0 51 void *data; /* data loaded by a renderer */
wolffd@0 52 size_t datasize; /* size of data (if mmap'ed) */
wolffd@0 53 void (*datafree)(usershape_t *us); /* renderer's function for freeing data */
wolffd@0 54 };
wolffd@0 55
wolffd@0 56 #ifdef __cplusplus
wolffd@0 57 }
wolffd@0 58 #endif
wolffd@0 59 #endif