Graphviz  2.41.20171026.1811
Macros | Enumerations | Functions | Variables
gvrender_gd.c File Reference
#include "config.h"
#include <stdlib.h>
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include <fcntl.h>
#include "gvplugin_render.h"
#include "gvplugin_device.h"
#include "gvcint.h"
#include "gd.h"
Include dependency graph for gvrender_gd.c:

Go to the source code of this file.

Macros

#define INT32_MAX   (2147483647)
 
#define UINT32_MAX   (4294967295U)
 
#define BEZIERSUBDIVISION   10
 
#define GD_XYMAX   INT32_MAX
 
#define FONTSIZE_MUCH_TOO_SMALL   0.15
 
#define FONTSIZE_TOO_SMALL   1.5
 
#define GD_IMPORT   extern
 

Enumerations

enum  format_type {
  FORMAT_PNG_XDOT, FORMAT_GIF_XDOT, FORMAT_JPEG_XDOT, FORMAT_SVG_XDOT,
  FORMAT_PS_XDOT, FORMAT_PNG_DOT, FORMAT_GIF_DOT, FORMAT_JPEG_DOT,
  FORMAT_SVG_DOT, FORMAT_PS_DOT, FORMAT_PNG_MAP, FORMAT_GIF_MAP,
  FORMAT_JPEG_MAP, FORMAT_SVG_MAP, FORMAT_PS_MAP, FORMAT_PNG_SVG,
  FORMAT_GIF_SVG, FORMAT_JPEG_SVG, FORMAT_SVG_SVG, FORMAT_PNG_FIG,
  FORMAT_GIF_FIG, FORMAT_JPEG_FIG, FORMAT_PNG_VRML, FORMAT_GIF_VRML,
  FORMAT_JPEG_VRML, FORMAT_PS_PS, FORMAT_PSLIB_PS, FORMAT_PNG_VML,
  FORMAT_GIF_VML, FORMAT_JPEG_VML, FORMAT_GIF_TK, FORMAT_DIA,
  FORMAT_DOT, FORMAT_CANON, FORMAT_PLAIN, FORMAT_PLAIN_EXT,
  FORMAT_XDOT, FORMAT_XDOT12, FORMAT_XDOT14, FORMAT_FIG,
  FORMAT_HPGL, FORMAT_JSON, FORMAT_JSON0, FORMAT_DOT_JSON,
  FORMAT_XDOT_JSON, FORMAT_IMAP, FORMAT_ISMAP, FORMAT_CMAP,
  FORMAT_CMAPX, FORMAT_MIF, FORMAT_MP, FORMAT_PIC,
  FORMAT_POV, FORMAT_PS, FORMAT_PS2, FORMAT_EPS,
  FORMAT_SVG, FORMAT_SVGZ, FORMAT_TK, FORMAT_VML,
  FORMAT_VMLZ, FORMAT_VTX, FORMAT_PNG_GD, FORMAT_GIF_GD,
  FORMAT_JPG_GD, FORMAT_GD_GD, FORMAT_GD2_GD, FORMAT_XPM_GD,
  FORMAT_WBMP_GD, FORMAT_XBM_GD, FORMAT_PNG_PS, FORMAT_GIF_PS,
  FORMAT_JPG_PS, FORMAT_GD_PS, FORMAT_GD2_PS, FORMAT_XPM_PS,
  FORMAT_WBMP_PS, FORMAT_XBM_PS, FORMAT_PNG_CAIRO, FORMAT_GIF_CAIRO,
  FORMAT_JPG_CAIRO, FORMAT_GD_CAIRO, FORMAT_GD2_CAIRO, FORMAT_XPM_CAIRO,
  FORMAT_WBMP_CAIRO, FORMAT_XBM_CAIRO, FORMAT_GIF, FORMAT_JPEG,
  FORMAT_PNG, FORMAT_WBMP, FORMAT_GD, FORMAT_GD2,
  FORMAT_XBM, FORMAT_PS_PS, FORMAT_PS, FORMAT_PS2,
  FORMAT_EPS, FORMAT_PNG_CAIRO, FORMAT_PNG_PS, FORMAT_CAIRO,
  FORMAT_PNG, FORMAT_PS, FORMAT_PDF, FORMAT_SVG
}
 

Functions

boolean mapbool (char *)
 
pointf Bezier (pointf *V, int degree, double t, pointf *Left, pointf *Right)
 
int gvdevice_gd_putBuf (gdIOCtx *context, const void *buffer, int len)
 
void gvdevice_gd_putC (gdIOCtx *context, int C)
 
void gdgen_text (gdImagePtr im, pointf spf, pointf epf, int fontcolor, double fontsize, int fontdpi, double fontangle, char *fontname, char *str)
 
char * gd_psfontResolve (PostscriptAlias *pa)
 

Variables

GD_IMPORT gdFontPtr gdFontTiny
 
GD_IMPORT gdFontPtr gdFontSmall
 
GD_IMPORT gdFontPtr gdFontMediumBold
 
GD_IMPORT gdFontPtr gdFontLarge
 
GD_IMPORT gdFontPtr gdFontGiant
 
gvplugin_installed_t gvrender_gd_types []
 
gvplugin_installed_t gvdevice_gd_types2 []
 

Macro Definition Documentation

#define BEZIERSUBDIVISION   10

Definition at line 48 of file gvrender_gd.c.

#define FONTSIZE_MUCH_TOO_SMALL   0.15

Definition at line 287 of file gvrender_gd.c.

Referenced by gdgen_text().

#define FONTSIZE_TOO_SMALL   1.5

Definition at line 289 of file gvrender_gd.c.

Referenced by gdgen_text().

#define GD_IMPORT   extern

Definition at line 294 of file gvrender_gd.c.

#define GD_XYMAX   INT32_MAX

Definition at line 74 of file gvrender_gd.c.

#define INT32_MAX   (2147483647)

Definition at line 28 of file gvrender_gd.c.

#define UINT32_MAX   (4294967295U)

Definition at line 31 of file gvrender_gd.c.

Enumeration Type Documentation

Enumerator
FORMAT_PNG_XDOT 
FORMAT_GIF_XDOT 
FORMAT_JPEG_XDOT 
FORMAT_SVG_XDOT 
FORMAT_PS_XDOT 
FORMAT_PNG_DOT 
FORMAT_GIF_DOT 
FORMAT_JPEG_DOT 
FORMAT_SVG_DOT 
FORMAT_PS_DOT 
FORMAT_PNG_MAP 
FORMAT_GIF_MAP 
FORMAT_JPEG_MAP 
FORMAT_SVG_MAP 
FORMAT_PS_MAP 
FORMAT_PNG_SVG 
FORMAT_GIF_SVG 
FORMAT_JPEG_SVG 
FORMAT_SVG_SVG 
FORMAT_PNG_FIG 
FORMAT_GIF_FIG 
FORMAT_JPEG_FIG 
FORMAT_PNG_VRML 
FORMAT_GIF_VRML 
FORMAT_JPEG_VRML 
FORMAT_PS_PS 
FORMAT_PSLIB_PS 
FORMAT_PNG_VML 
FORMAT_GIF_VML 
FORMAT_JPEG_VML 
FORMAT_GIF_TK 
FORMAT_DIA 
FORMAT_DOT 
FORMAT_CANON 
FORMAT_PLAIN 
FORMAT_PLAIN_EXT 
FORMAT_XDOT 
FORMAT_XDOT12 
FORMAT_XDOT14 
FORMAT_FIG 
FORMAT_HPGL 
FORMAT_JSON 
FORMAT_JSON0 
FORMAT_DOT_JSON 
FORMAT_XDOT_JSON 
FORMAT_IMAP 
FORMAT_ISMAP 
FORMAT_CMAP 
FORMAT_CMAPX 
FORMAT_MIF 
FORMAT_MP 
FORMAT_PIC 
FORMAT_POV 
FORMAT_PS 
FORMAT_PS2 
FORMAT_EPS 
FORMAT_SVG 
FORMAT_SVGZ 
FORMAT_TK 
FORMAT_VML 
FORMAT_VMLZ 
FORMAT_VTX 
FORMAT_PNG_GD 
FORMAT_GIF_GD 
FORMAT_JPG_GD 
FORMAT_GD_GD 
FORMAT_GD2_GD 
FORMAT_XPM_GD 
FORMAT_WBMP_GD 
FORMAT_XBM_GD 
FORMAT_PNG_PS 
FORMAT_GIF_PS 
FORMAT_JPG_PS 
FORMAT_GD_PS 
FORMAT_GD2_PS 
FORMAT_XPM_PS 
FORMAT_WBMP_PS 
FORMAT_XBM_PS 
FORMAT_PNG_CAIRO 
FORMAT_GIF_CAIRO 
FORMAT_JPG_CAIRO 
FORMAT_GD_CAIRO 
FORMAT_GD2_CAIRO 
FORMAT_XPM_CAIRO 
FORMAT_WBMP_CAIRO 
FORMAT_XBM_CAIRO 
FORMAT_GIF 
FORMAT_JPEG 
FORMAT_PNG 
FORMAT_WBMP 
FORMAT_GD 
FORMAT_GD2 
FORMAT_XBM 
FORMAT_PS_PS 
FORMAT_PS 
FORMAT_PS2 
FORMAT_EPS 
FORMAT_PNG_CAIRO 
FORMAT_PNG_PS 
FORMAT_CAIRO 
FORMAT_PNG 
FORMAT_PS 
FORMAT_PDF 
FORMAT_SVG 

Definition at line 35 of file gvrender_gd.c.

Function Documentation

pointf Bezier ( pointf V,
int  degree,
double  t,
pointf Left,
pointf Right 
)

Definition at line 221 of file utils.c.

References NULL, W_DEGREE, pointf_s::x, and pointf_s::y.

Referenced by bezier_clip(), dotneato_closest(), place_portlabel(), spline_at_y(), and update_bb_bz().

char* gd_psfontResolve ( PostscriptAlias pa)
void gdgen_text ( gdImagePtr  im,
pointf  spf,
pointf  epf,
int  fontcolor,
double  fontsize,
int  fontdpi,
double  fontangle,
char *  fontname,
char *  str 
)

Definition at line 298 of file gvrender_gd.c.

References FONTSIZE_MUCH_TOO_SMALL, FONTSIZE_TOO_SMALL, PF2P, point::x, and point::y.

int gvdevice_gd_putBuf ( gdIOCtx *  context,
const void *  buffer,
int  len 
)

Definition at line 21 of file gvdevice_gd.c.

References gvwrite().

void gvdevice_gd_putC ( gdIOCtx *  context,
int  C 
)

Definition at line 27 of file gvdevice_gd.c.

References C, and gvwrite().

boolean mapbool ( char *  )

Variable Documentation

GD_IMPORT gdFontPtr gdFontGiant

Definition at line 296 of file gvrender_gd.c.

GD_IMPORT gdFontPtr gdFontLarge

Definition at line 296 of file gvrender_gd.c.

GD_IMPORT gdFontPtr gdFontMediumBold

Definition at line 296 of file gvrender_gd.c.

GD_IMPORT gdFontPtr gdFontSmall

Definition at line 296 of file gvrender_gd.c.

GD_IMPORT gdFontPtr gdFontTiny

Definition at line 296 of file gvrender_gd.c.

gvplugin_installed_t gvdevice_gd_types2[]
Initial value:
= {
{FORMAT_GD, "gd:gd", 1, NULL, &device_features_gd_tc_no_writer},
{0, NULL, 0, NULL, NULL}
}
#define NULL
Definition: logic.h:39

Definition at line 669 of file gvrender_gd.c.

gvplugin_installed_t gvrender_gd_types[]
Initial value:
= {
{FORMAT_GD, "gd", 1, &gdgen_engine, &render_features_gd},
{0, NULL, 0, NULL, NULL}
}
#define NULL
Definition: logic.h:39

Definition at line 664 of file gvrender_gd.c.