Graphviz 13.0.0~dev.20241220.2304
|
#include "config.h"
#include "gdioctx_wrapper.h"
#include "gdgen_text.h"
#include "gd_psfontResolve.h"
#include <assert.h>
#include <limits.h>
#include <math.h>
#include <stdbool.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <fcntl.h>
#include <gvc/gvplugin_render.h>
#include <gvc/gvplugin_device.h>
#include <gvc/gvcint.h>
#include <gd.h>
#include <gdfontt.h>
#include <gdfonts.h>
#include <gdfontmb.h>
#include <gdfontl.h>
#include <gdfontg.h>
#include <util/alloc.h>
#include <util/unreachable.h>
Go to the source code of this file.
Macros | |
#define | BEZIERSUBDIVISION 10 |
#define | GD_XYMAX INT32_MAX |
#define | FONTSIZE_MUCH_TOO_SMALL 0.15 |
#define | FONTSIZE_TOO_SMALL 1.5 |
Enumerations | |
enum | format_type { FORMAT_GIF , FORMAT_JPEG , FORMAT_PNG , FORMAT_WBMP , FORMAT_GD , FORMAT_GD2 , FORMAT_XBM } |
Functions | |
bool | mapbool (const char *) |
pointf | Bezier (pointf *V, double t, pointf *Left, pointf *Right) |
static void | gdgen_resolve_color (GVJ_t *job, gvcolor_t *color) |
static void | gdgen_begin_page (GVJ_t *job) |
static void | gdgen_end_page (GVJ_t *job) |
void | gdgen_text (gdImagePtr im, pointf spf, pointf epf, int fontcolor, double fontsize, int fontdpi, double fontangle, char *fontname, char *str) |
static void | gdgen_textspan (GVJ_t *job, pointf p, textspan_t *span) |
static int | gdgen_set_penstyle (GVJ_t *job, gdImagePtr im, gdImagePtr *brush) |
static void | gdgen_bezier (GVJ_t *job, pointf *A, size_t n, int filled) |
static void | gdgen_polygon (GVJ_t *job, pointf *A, size_t n, int filled) |
static void | gdgen_ellipse (GVJ_t *job, pointf *A, int filled) |
static void | gdgen_polyline (GVJ_t *job, pointf *A, size_t n) |
Variables | |
static int | transparent |
static int | basecolor |
static gdPoint * | points |
static size_t | points_allocated |
static gvrender_engine_t | gdgen_engine |
static gvrender_features_t | render_features_gd |
static gvdevice_features_t | device_features_gd_tc_no_writer |
gvplugin_installed_t | gvrender_gd_types [] |
gvplugin_installed_t | gvdevice_gd_types2 [] |
#define BEZIERSUBDIVISION 10 |
Definition at line 48 of file gvrender_gd.c.
#define FONTSIZE_MUCH_TOO_SMALL 0.15 |
Definition at line 242 of file gvrender_gd.c.
#define FONTSIZE_TOO_SMALL 1.5 |
Definition at line 244 of file gvrender_gd.c.
#define GD_XYMAX INT32_MAX |
Definition at line 74 of file gvrender_gd.c.
enum format_type |
Enumerator | |
---|---|
FORMAT_GIF | |
FORMAT_JPEG | |
FORMAT_PNG | |
FORMAT_WBMP | |
FORMAT_GD | |
FORMAT_GD2 | |
FORMAT_XBM |
Definition at line 35 of file gvrender_gd.c.
Definition at line 168 of file utils.c.
References NULL, V, W_DEGREE, pointf_s::x, and pointf_s::y.
Referenced by approx_bezier(), arrow_type_curve(), bezier_clip(), dotneato_closest(), fig_bezier(), findHorizontal(), findVertical(), gdgen_bezier(), pathtolines(), pic_bezier(), place_portlabel(), splineIntersectf(), splitBSpline(), and update_bb_bz().
|
static |
Definition at line 76 of file gvrender_gd.c.
References agget(), GVCOMMON_s::cmdname, GVJ_s::common, GVJ_s::context, GVCOMMON_s::errorfn, GVJ_s::external_context, gvplugin_active_render_s::features, gvrender_features_t::flags, GVC_s::g, GD_has_images, GD_XYMAX, GVJ_s::gvc, GVDEVICE_DOES_TRUECOLOR, GVJ_s::height, mapbool(), NULL, GVJ_s::render, scale(), transparent, GVCOMMON_s::verbose, GVJ_s::width, and GVJ_s::zoom.
Definition at line 407 of file gvrender_gd.c.
References A, Bezier(), BEZIERSUBDIVISION, GVJ_s::context, F, obj_state_s::fillcolor, gdgen_set_penstyle(), color_s::index, NULL, GVJ_s::obj, PF2P, color_s::u, and V.
Definition at line 485 of file gvrender_gd.c.
References A, GVJ_s::context, dx, dy, obj_state_s::fillcolor, gdgen_set_penstyle(), color_s::index, NULL, GVJ_s::obj, ROUND, and color_s::u.
|
static |
Definition at line 154 of file gvrender_gd.c.
References basecolor, black, GVJ_s::context, gd_context_t::ctx, GVJ_s::external_context, FORMAT_GD, FORMAT_GD2, FORMAT_GIF, FORMAT_JPEG, FORMAT_PNG, FORMAT_WBMP, FORMAT_XBM, gvdevice_gd_putBuf(), gvdevice_gd_putC(), gvplugin_active_render_s::id, gd_context_t::job, NULL, GVJ_s::output_file, GVJ_s::render, transparent, and UNREACHABLE.
Definition at line 451 of file gvrender_gd.c.
References A, GVJ_s::context, obj_state_s::fillcolor, gdgen_set_penstyle(), gv_recalloc(), color_s::index, NULL, GVJ_s::obj, points, points_allocated, ROUND, and color_s::u.
Definition at line 515 of file gvrender_gd.c.
References A, GVJ_s::context, gdgen_set_penstyle(), NULL, ROUND, pointf_s::x, and pointf_s::y.
Definition at line 50 of file gvrender_gd.c.
References alpha, color(), COLOR_INDEX, and GVJ_s::context.
|
static |
Definition at line 359 of file gvrender_gd.c.
References color_s::index, GVJ_s::obj, obj_state_s::pen, PEN_DASHED, PEN_DOTTED, obj_state_s::pencolor, obj_state_s::penwidth, PENWIDTH_NORMAL, color_s::u, and GVJ_s::zoom.
Referenced by gdgen_bezier(), gdgen_ellipse(), gdgen_polygon(), and gdgen_polyline().
void gdgen_text | ( | gdImagePtr | im, |
pointf | spf, | ||
pointf | epf, | ||
int | fontcolor, | ||
double | fontsize, | ||
int | fontdpi, | ||
double | fontangle, | ||
char * | fontname, | ||
char * | str | ||
) |
Definition at line 246 of file gvrender_gd.c.
References err, font, FONTSIZE_MUCH_TOO_SMALL, FONTSIZE_TOO_SMALL, free(), PF2P, str, point::x, and point::y.
Referenced by gdgen_textspan().
|
static |
Definition at line 304 of file gvrender_gd.c.
References GVJ_s::context, GVJ_s::dpi, textspan_t::font, gd_psfontResolve(), gdgen_text(), color_s::index, textspan_t::just, M_PI, textfont_t::name, GVJ_s::obj, obj_state_s::pencolor, POINTS_PER_INCH, textfont_t::postscript_alias, GVJ_s::rotation, textfont_t::size, textspan_t::size, textspan_t::str, color_s::u, pointf_s::x, pointf_s::y, textspan_t::yoffset_centerline, and GVJ_s::zoom.
|
extern |
Definition at line 335 of file utils.c.
References mapBool().
Referenced by angleSet(), circularLayout(), common_init_edge(), dot_mincross(), dot_rank(), dotLayout(), emit_begin_edge(), emit_end_edge(), findRootNode(), gdgen_begin_page(), getAdjustMode(), graph_init(), init_nop(), initialPositions(), is_a_cluster(), is_a_strong_cluster(), is_nonconstraint(), late_bool(), majorization(), neato_layout(), noClip(), nonconstraint_edge(), poly_init(), record_init(), tuneControl(), user_pos(), and visible().
|
static |
Definition at line 72 of file gvrender_gd.c.
Referenced by gdgen_end_page().
|
static |
Definition at line 601 of file gvrender_gd.c.
|
static |
Definition at line 541 of file gvrender_gd.c.
gvplugin_installed_t gvdevice_gd_types2[] |
Definition at line 615 of file gvrender_gd.c.
gvplugin_installed_t gvrender_gd_types[] |
Definition at line 610 of file gvrender_gd.c.
|
static |
Definition at line 448 of file gvrender_gd.c.
Referenced by bestInk(), gdgen_polygon(), gdiplusgen_bezier(), gdiplusgen_polygon(), gdiplusgen_polyline(), make_flat_labeled_edge(), makeLineEdge(), makeSimpleFlat(), makeSimpleFlatLabels(), selfBottom(), selfLeft(), selfRight(), selfTop(), sumLengths(), sumLengths_avoid_bad_angle(), tclGdPolygonCmd(), and triangulate().
|
static |
Definition at line 449 of file gvrender_gd.c.
Referenced by gdgen_polygon().
|
static |
Definition at line 574 of file gvrender_gd.c.
|
static |
Definition at line 72 of file gvrender_gd.c.
Referenced by gdgen_begin_page(), and gdgen_end_page().