gvplugin_gd_LTX_plugin,
gvplugin_text_LTX_plugin;
#endif
-extern gvplugin_layout_LTX_plugin;
+extern gvplugin_t gvplugin_layout_LTX_plugin;
gvplugin_t *builtins[] = {
#ifndef DISABLE_GVRENDER
gvplugin_gd_LTX_plugin,
gvplugin_text_LTX_plugin;
#endif
-extern gvplugin_layout_LTX_plugin;
+extern gvplugin_t gvplugin_layout_LTX_plugin;
gvplugin_t *builtins[] = {
#ifndef DISABLE_GVRENDER
AC_DEFINE_UNQUOTED(DEFAULT_FONTPATH,"$DEFAULT_FONTPATH",Path to TrueType fonts.)
AC_DEFINE_UNQUOTED(PATHSEPARATOR,"$PATHSEPARATOR",Path separator character.)
-DEFAULT_DPI=96.0
+DEFAULT_DPI=96
AC_DEFINE_UNQUOTED(DEFAULT_DPI,$DEFAULT_DPI,Default DPI.)
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
--datadir=%{_datadir} \
--mandir=%{_mandir} \
--with-x \
- --enable-gvrender \
+ --disable-gvrender \
--with-mylibgd
# need gd-2.0.29 commonly available in rpms before removing --enable-mylibgd
%__make %{?_smp_mflags}
#define RADIANS(deg) ((deg)/180.0 * PI)
#define DEGREES(rad) ((rad)/PI * 180.0)
#define DIST(x1,y1,x2,y2) (sqrt(((x1) - (x2))*((x1) - (x2)) + ((y1) - (y2))*((y1) - (y2))))
-#define POINTS_PER_INCH 72.0
+#define POINTS_PER_INCH 72
#define POINTS(f_inch) (ROUND((f_inch)*POINTS_PER_INCH))
-#define PS2INCH(ps) ((ps)/POINTS_PER_INCH)
+#define PS2INCH(ps) ((ps)/(double)POINTS_PER_INCH)
#define isPinned(n) (ND_pinned(n) == P_PIN)
#define hasPos(n) (ND_pinned(n) > 0)
gvc->lib = lib;
gvc->pages = pages;
- if (gvre) {
- /* establish viewport and scaling */
- if (dpi < 1.0)
+ /* establish viewport and scaling */
+ if (dpi == 0) {
+ if (gvre)
dpi = gvc->render_features->default_dpi;
- gvc->dpi = dpi;
- gvc->width = ROUND(X * dpi / POINTS_PER_INCH);
- gvc->height = ROUND(Y * dpi / POINTS_PER_INCH);
- gvc->zoom = Z; /* scaling factor */
- gvc->focus.x = x; /* graph coord of focus - points */
- gvc->focus.y = y;
+ else
+ dpi = DEFAULT_DPI;
+ }
+ gvc->dpi = dpi;
+ gvc->width = ROUND(X * dpi / POINTS_PER_INCH);
+ gvc->height = ROUND(Y * dpi / POINTS_PER_INCH);
+ gvc->zoom = Z; /* scaling factor */
+ gvc->focus.x = x; /* graph coord of focus - points */
+ gvc->focus.y = y;
+ if (gvre) {
if (gvre->begin_job)
gvre->begin_job(gvc);
}
typedef struct {
int flags;
int default_margin;
- double default_dpi;
+ int default_dpi;
char **knowncolors;
int sz_knowncolors;
color_type_t color_type;
color_t bgcolor; /* background color */
unsigned int width;
unsigned int height;
- double dpi; /* resolution dots-per-inch */
+ int dpi; /* resolution dots-per-inch */
int rot; /* rotation */
double zoom; /* viewport zoom factor */
/* FIXME - nasty hack because memGD is not a language available from command line */
#if 0
gvc->job->output_lang =
- lang_select(gvc, gvc->job->output_langname, 0);
+ gvrender_select(gvc, gvc->job->output_langname);
+
#else
gvc->job->output_lang = memGD;
#endif
}
/* populate new job struct with output language and output file data */
gvc->job->output_lang =
- lang_select(gvc, gvc->job->output_langname, 0);
+ gvrender_select(gvc, gvc->job->output_langname);
if (Tcl_GetOpenFile
(interp, argv[2], 1, 1,
(ClientData *) & (gvc->job->output_file)) != TCL_OK)