#include <dkconfig.h>
#include "config.h"
#include <dk.h>
#include <dkerror.h>
#include <dklic.h>
#include <dksf.h>
#include <dkma.h>
#include <dkmem.h>
#include <dkstr.h>
#include <dksto.h>
#include <dkstream.h>
#include <dkof.h>
#include <dkapp.h>
#include <dklogc.h>
#include <dkl2l.h>
#include <dkfont.h>
#include <dkle.h>
#include <dkenc.h>
#include "dkxsp.h"
#include "dkbsp.h"


Go to the source code of this file.
Data Structures | |
| struct | dkfig_bitmap_width |
| Bitmap header information. More... | |
| struct | dk_fig_bb |
| Bounding box in Fig coordinates. More... | |
| struct | dk_fig_opt |
| Structure used to store options and file names. More... | |
| struct | dk_fig_point |
| Point coordinates. More... | |
| struct | dk_fig_bezier_point |
| Bezier point data. More... | |
| struct | dk_fig_arrow |
| Arrowhead data. More... | |
| struct | dk_fig_fpd |
| Filling, pattern and drawing. More... | |
| struct | _dk_fig_object_ |
| Fig file object. More... | |
| struct | dk_fig_drawing |
| Fig drawing. More... | |
| struct | dk_fig_compound |
| Compound object (group). More... | |
| struct | dk_fig_arc_calc |
| Arc calculations struct. More... | |
| struct | dk_fig_arc |
| Arc object. More... | |
| struct | dk_fig_ellipse |
| Ellipse object. More... | |
| struct | dk_fig_polyline |
| Polyline object. More... | |
| struct | dk_fig_spline |
| X-spline object. More... | |
| struct | dk_fig_fonth_t |
| Font handling. More... | |
| struct | dk_fig_text |
| Text object. More... | |
| struct | dk_fig_colorcell |
| Color cell object. More... | |
| struct | dk_fig_dcc |
| Color cell. More... | |
| struct | _dkfig_font_ |
| Font. More... | |
| struct | dk_fig_conversion |
| Conversion job structure. More... | |
| struct | dk_fig_output_mp |
| MetaPost output structure. More... | |
| struct | dk_fig_rot_ellipse |
| Rotated ellipse. More... | |
| struct | dkfig_mp_output_instruction |
| MetaPost output structure. More... | |
| struct | dkfig_eps_output_instruction |
| EPS output structure. More... | |
| struct | dkfig_svg_output_instruction |
| SVG output structure. More... | |
| struct | _dk_fig_svg_pat_ |
| SVG fill pattern. More... | |
| struct | _dk_fig_svg_style_ |
| SVG fill style. More... | |
| struct | _dk_fig_svg_attr_ |
| SVG attribute. More... | |
| struct | _dk_fig_svg_drve_ |
| SVG-driver-specific data for an object. More... | |
| struct | dkfig_eps_image_info |
| Image used in EPS output driver. More... | |
| struct | dkfig_pdf_image |
| Image used by PDF output driver. More... | |
| struct | dkfig_pdf_pattern |
| Pattern description for PDF output driver. More... | |
| struct | dkfig_pdf_drve_text |
| PDF-driver-specific object extension. More... | |
| struct | _dkfig_pdf_output_instruction_ |
| PDF output instruction. More... | |
| struct | dkfig_java_image |
| Image for Java output driver. More... | |
| struct | dkfig_java_color |
| Color for Java output driver. More... | |
| struct | dkfig_java_font |
| Font for Java output driver. More... | |
| struct | dkfig_java_stroke |
| Stroke for Java output driver. More... | |
| struct | dkfig_java_drve |
| Driver specific object extension for Java output driver. More... | |
| struct | dkfig_java_output_instruction |
| Java conversion structure. More... | |
| struct | dkfig_pdf_object_position |
| PDF object position. More... | |
Defines | |
| #define | DK_FIG_OBJ_COLOR 0 |
| Fig object: Color. | |
| #define | DK_FIG_OBJ_ELLIPSE 1 |
| Fig object: Ellipse. | |
| #define | DK_FIG_OBJ_POLYLINE 2 |
| Fig object: Polyline. | |
| #define | DK_FIG_OBJ_SPLINE 3 |
| Fig object: Spline. | |
| #define | DK_FIG_OBJ_TEXT 4 |
| Fig object: Text. | |
| #define | DK_FIG_OBJ_ARC 5 |
| Fig object: Arc. | |
| #define | DK_FIG_OBJ_COMPOUND 6 |
| Fig object: Compound (group of objects). | |
| #define | DK_FIG_OBJ_DRAWING 255 |
| Fig object: Drawing. | |
| #define | DKFIG_WHAT_RUN 0 |
| Command: Run conversion. | |
| #define | DKFIG_WHAT_VERSION 1 |
| Command: Show version. | |
| #define | DKFIG_WHAT_HELP 2 |
| Command: Show help text. | |
| #define | DKFIG_WHAT_CONFIGURE 4 |
| Command: Save configuration settings. | |
| #define | DKFIG_WHAT_UNCONFIGURE 8 |
| Command: Delete saved configuration settings. | |
| #define | DKFIG_WHAT_SHOWCONF 16 |
| Command: Show current configuration. | |
| #define | DKFIG_WHAT_ERROR 32 |
| Command: Error occured, show error message and help text. | |
| #define | DKFIG_WHAT_CONFIG_FILE 64 |
| Command: Show configuration file contents. | |
| #define | DKFIG_WHAT_WRITE_CONFIG_FILE 128 |
| Command: Save new configuration file contents. | |
| #define | DKFIG_WHAT_APP |
| Command group: All application commands. | |
| #define | DKFIG_OPT_RESET 0x00000001UL |
| Options (1): Reset all options to built-in defaults. | |
| #define | DKFIG_OPT_MAKE 0x00000002UL |
| Options (1): Make mode. | |
| #define | DKFIG_OPT_OLD_TEX 0x00000004UL |
| Options (1): Use TeX, not LaTeX. | |
| #define | DKFIG_OPT_NO_EMBEDDED_FONTS 0x00000008UL |
| Options (1): Do not embed fonts (MetaPost driver). | |
| #define | DKFIG_OPT_WEB_PALETTE 0x00000010UL |
| Options (1): Use web-optimized color palette. | |
| #define | DKFIG_OPT_USE_CS_SETTING 0x00000020UL |
| Options (1): use coordiantes system settings from Fig file. | |
| #define | DKFIG_OPT_ENLIGHTEN_LOOK 0x00000040UL |
| Options (1): Enlighten look (half line size only). | |
| #define | DKFIG_OPT_VERBOSE_OUTPUT 0x00000080UL |
| Options (1): Write additional comments to output file. | |
| #define | DKFIG_OPT_REMOVE_THIN_BORDERS 0x00000100UL |
| Options (1): Remove zero linewidth borders. | |
| #define | DKFIG_OPT_METAPOST_ARROWHEADS 0x00000200UL |
| Options (1): Use MetaPost arrowheads (MetaPost driver). | |
| #define | DKFIG_OPT_FILL_PATTERNS 0x00000400UL |
| Options (1): Allow use of fill patterns. | |
| #define | DKFIG_OPT_FILL_CONTIGOUS 0x00000800UL |
| Options (1): Fill patterns of neighboured objects are contiguous. | |
| #define | DKFIG_OPT_SPECIFY_WRITE18 0x00001000UL |
| Options (1): When running LaTeX, specify enable/disable write18 (unused). | |
| #define | DKFIG_OPT_ENABLE_WRITE18 0x00002000UL |
| Options (1): When running LaTeX, enable write18 (unused). | |
| #define | DKFIG_OPT_USE_PS_SHOWPAGE 0x00004000UL |
| Options (1): PS showpage operator allowed. | |
| #define | DKFIG_OPT_KEEP_TEX_FILES 0x00008000UL |
| Options (1): After running TeX/LaTeX do not delete *.tex files (unused). | |
| #define | DKFIG_OPT_NETPBM_INITIALIZED 0x00010000UL |
| Options (1): Flag "NetPBM initialized". | |
| #define | DKFIG_OPT_ALLOW_PSRL 0x00020000UL |
| Options (1): Allow PS run-length compression. | |
| #define | DKFIG_OPT_SEPARATED_RGB 0x00040000UL |
| Options (1): use separated channels for RGB. | |
| #define | DKFIG_OPT_REMOVE_BITMAP_BORDER 0x00080000UL |
| Options (1): Remove border around bitmap images. | |
| #define | DKFIG_OPT_KEEP_BITMAP_WH_RATIO 0x00100000UL |
| Options (1): Keep aspect ration when scaling bitmap images. | |
| #define | DKFIG_OPT_FILL_BITMAP_AREA 0x00200000UL |
| Options (1): Fill bitmap area using the fill color. | |
| #define | DKFIG_OPT_BITMAP_DICTIONARY 0x00400000UL |
| Options (1): Use separated PostScript dictionary for image. | |
| #define | DKFIG_OPT_GARBAGE_COLLECTION 0x00800000UL |
| Options (1): In PostScript suggest garbage collection after image. | |
| #define | DKFIG_OPT_USE_CSS 0x01000000UL |
| Options (1): Use CSS for styling SVG objects. | |
| #define | DKFIG_OPT_SVG_EMBEDDED 0x02000000UL |
| Options (1): For SVG produce partial file for embedding to XML files. | |
| #define | DKFIG_OPT_REPORT_MULTIPLE 0x04000000UL |
| Options (1): Show warning about special text multiple times (for each occurance). | |
| #define | DKFIG_OPT_IGNORE_UNKNOWN_PAPER 0x08000000UL |
| Options (1): Ignore unknown paper size. | |
| #define | DKFIG_OPT_PREPARE_FOR_MODS 0x10000000UL |
| Options (1): Prepare SVG output for modifications (do not use CSS). | |
| #define | DKFIG_OPT_DP_DOT_LW 0x20000000UL |
| Options (1): For dashed lines, a dot has linewidth length instead of 0. | |
| #define | DKFIG_OPT_WR_TEX_COMMAND 0x40000000UL |
| Options (1): Write TeX/LaTeX command to start of output (MetaPost driver). | |
| #define | DKFIG_OPT_REMOVE_BG_RECTANGLE 0x80000000UL |
| Options (1): Do not draw the background rectangle. | |
| #define | DKFIG_OPT_SKIP_ALL_TEXTS 0x00000001UL |
| Options (2): Skip all texts (let TeX/LaTeX handle them). | |
| #define | DKFIG_OPT_CRNL 0x00000002UL |
| Options (2): Use carriage/newline instead of simple newline. | |
| #define | DKFIG_OPT_PLAIN_TEXT_STREAMS 0x00000004UL |
| Options (2): Do not compress graphics streams (PDF driver). | |
| #define | DKFIG_OPT_FULL_SCREEN 0x00000008UL |
| Options (2): Open output in full-screen mode (PDF driver). | |
| #define | DKFIG_OPT_FILL_NONZERO 0x00000010UL |
| Options (2): Use nonzero fill method, not even-odd (PDF driver). | |
| #define | DKFIG_OPT_PDF_PATTERN_TILE 0x00000020UL |
| Options (2): Used tiled patterns (PDF driver). | |
| #define | DKFIG_OPT_FLIP_DIAGONAL 0x00000040UL |
| Options (2): Flip objects diagonally. | |
| #define | DKFIG_OPT_INTERPOLATE_IMAGES 0x00000080UL |
| Options (2): Set interpolation flag for bitmap images. | |
| #define | DKFIG_OPT_FULL_TEX_FILE 0x00000100UL |
| Options (2): Write full LaTeX source instead of fragment (TeX driver). | |
| #define | DKFIG_OPT_WHITE_BGRECT 0x00000200UL |
| Options (2): Background rectangle uses white color, not default. | |
| #define | DKFIG_OPT_TEX_DRIVER 0x00000400UL |
| Options (2): Use tex command, not latex (TeX driver). | |
| #define | DKFIG_OPT_SETPAGEDEVICE 0x00000800UL |
| Options (2): Use setpagedevice instruction (PS driver). | |
| #define | DKFIG_OPT_SVG_FONTSIZE_UNIT 0x00001000UL |
| Options (2): A unit for font sizes was specified, use it (SVG driver). | |
| #define | DKFIG_OPT_UTF_8 0x00002000UL |
| Options (2): Text is UTF-8 encoded. | |
| #define | DKFIG_OPT_UTF_AUTO 0x00004000UL |
| Options (2): Check LANG environment variable for UTF-8 setting. | |
| #define | DKFIG_OPT_HAVE_ALPHA_CHANNEL 0x00008000UL |
| Options (2): Image contains alpha channel data. | |
| #define | DKFIG_OPT_SUPPRESS_ALPHA_INFO 0x00010000UL |
| Options (2): Suppress info message about alpha channel in bitmap image. | |
| #define | DKFIG_OPT_PDF_PAGE_ATTRIBUTES 0x00020000UL |
| Options (2): Write PDF page attributes instruction (TeX driver). | |
| #define | DKFIG_OPT_FILL_BOUNDING_BOX 0x00040000UL |
| Options (2): Fill bounding box white before drawing. | |
| #define | DKFIG_OPT_COLOR 0x00080000UL |
| Options (2): Colored output, not grayscale. | |
| #define | DKFIG_OPT_ALIGN_ON_PAPER 0x00100000UL |
| Options (2): Align graphics on paper. | |
| #define | DKFIG_OPT_USE_GS_FONTS 0x00200000UL |
| Options (2): Use GS fonts. | |
| #define | DKFIG_ALIGN_H_LEFT 0 |
| Horizontal alignment: left. | |
| #define | DKFIG_ALIGN_H_CENTERED 1 |
| Horizontal alignment: centered. | |
| #define | DKFIG_ALIGN_H_RIGHT 2 |
| Horizontal alignment: right. | |
| #define | DKFIG_ALIGN_V_TOP 0 |
| Vertical alignment: top. | |
| #define | DKFIG_ALIGN_V_CENTERED 1 |
| Vertical alignment: centered. | |
| #define | DKFIG_ALIGN_V_BOTTOM 2 |
| Vertical alignment: bottom. | |
| #define | DKFIG_TH_FONT_FIG 1 |
| Text handling: Use font as specified in Fig file. | |
| #define | DKFIG_TH_FONT_SIMILAR 2 |
| Text handling: Use font with same features as font in Fig file (roman/sans-serif/typewriter, normal/bold, upright/italic). | |
| #define | DKFIG_TH_FONT_TEX 4 |
| Text handling: Leave all decisions about the font up to LaTeX/TeX. | |
| #define | DKFIG_TH_FONT_MASK 7 |
| Text handling: Mask to find DKFIG_TH_FONT_FIG, DKFIG_TH_FONT_SIMILAR or DKFIG_TH_FONT_TEX. | |
| #define | DKFIG_TH_SIZE_FIG 8 |
| Text handling: Leave font size decision up to LaTeX/TeX. | |
| #define | DKFIG_TH_HANDLING 16 |
| Text handling: LaTeX/TeX font name, not PS . | |
| #define | DKFIG_TH_MBOX 32 |
| Text handling: Enclose text label in {} instruction. | |
| #define | DKFIG_BD_MP 0 |
| Base driver: MetaPost. | |
| #define | DKFIG_BD_MPS 1 |
| Base driver: MPS (unused). | |
| #define | DKFIG_BD_EPS 2 |
| Base driver: EPS. | |
| #define | DKFIG_BD_SVG 3 |
| Base driver: SVG. | |
| #define | DKFIG_BD_PDF 4 |
| Base driver: PDF. | |
| #define | DKFIG_FONT_RM 1 |
| Font feature: Roman. | |
| #define | DKFIG_FONT_SF 2 |
| Font feature: Sans-serif. | |
| #define | DKFIG_FONT_TT 3 |
| Font feature: Typewriter. | |
| #define | DKFIG_FONT_BD 4 |
| Font feature: Bold. | |
| #define | DKFIG_FONT_IT 8 |
| Font feature: Italic. | |
| #define | DKFIG_FONT_FAMILY_MASK (DKFIG_FONT_TT|DKFIG_FONT_SF|DKFIG_FONT_RM) |
| Font feature mask: find roman/sans-serif/italic. | |
| #define | DKFIG_ERROR_NONE 0 |
| Error handling: No error occured. | |
| #define | DKFIG_ERROR_MEMORY 1 |
| Error handling: Not enough memory. | |
| #define | DKFIG_ERROR_SYNTAX 2 |
| Error handling: Syntax error. | |
| #define | DKFIG_ERROR_MATH 3 |
| Error handling: Numeric error occured. | |
| #define | DKFIG_SPLINE_FLAG_ONE_PARTIAL 1 |
| Very special case: An X-Spline is represented by one Bezier spline segment which must be shortened for arrowheads. | |
| #define | DKFIG_NUMBER_OF_PATTERNS 22 |
| Number of different patterns used by the Fig file format. | |
| #define | DKFIG_EPSILON 0.0001 |
| Epsilon for numeric calculations. | |
| #define | DKFIG_DSC_OLD 2 |
| Default DSC level. | |
| #define | DKFIG_SVG_VERS_10 0 |
| SVG format version 1.0. | |
| #define | DKFIG_SVG_VERS_11 1 |
| SVG format version 1.1. | |
| #define | DKFIG_SVG_VERS_12 2 |
| SVG format version 1.2. | |
| #define | DKFIG_SVG_VP_POINTS 0 |
| SVG viewport unit: points. | |
| #define | DKFIG_SVG_VP_PIXELS 1 |
| SVG viewport unit: pixels. | |
| #define | DKFIG_SVG_VP_INCHES 2 |
| SVG viewport unit: inches. | |
| #define | DKFIG_SVG_FL_STROKE 0x00000001UL |
| SVG style flag: Stroke setup defined. | |
| #define | DKFIG_SVG_FL_FILL 0x00000002UL |
| SVG style flag: Fill setup defined. | |
| #define | DKFIG_SVG_FL_TEXT 0x00000004UL |
| SVG style flag: Text setup defined. | |
| #define | DKFIG_SVG_FL_ENLIGHTEN 0x00000008UL |
| SVG style flag: Enlighten look. | |
| #define | DKFIG_PDF_PROCSET_TEXT 1 |
| PDF procsets: Text. | |
| #define | DKFIG_PDF_PROCSET_IMGG 2 |
| PDF procsets: Grayscaled images. | |
| #define | DKFIG_PDF_PROCSET_IMGC 4 |
| PDF procsets: Colored images. | |
| #define | DKFIG_ALWAYS_RE_ENCODE 0 |
| PS driver: Always re-encode font. | |
| #define | DKFIG_PROGRAM_NAME "fig2vect" |
| Program name. | |
| #define | DKFIG_DRIVER_MP 0 |
| Drivers: MetaPost. | |
| #define | DKFIG_DRIVER_MMP 1 |
| Drivers: Multi-MetaPost. | |
| #define | DKFIG_DRIVER_EPS 2 |
| Drivers: EPS. | |
| #define | DKFIG_DRIVER_SVG 3 |
| Drivers: SVG. | |
| #define | DKFIG_DRIVER_TEX 4 |
| Drivers: LaTeX/TeX. | |
| #define | DKFIG_DRIVER_BB 5 |
| Drivers: Bounding box. | |
| #define | DKFIG_DRIVER_PDF 6 |
| Drivers: PDF. | |
| #define | DKFIG_DRIVER_PS 7 |
| Drivers: PS. | |
| #define | DKFIG_DRIVER_JAVA 8 |
| Drivers: Java. | |
| #define | DKFIG_PT_PER_INCH 72.72 |
| Unit length: pt per inch. | |
| #define | DKFIG_BP_PER_INCH 72.0 |
| Unit length: bp per inch. | |
Typedefs | |
| typedef struct _dk_fig_object_ | dk_fig_object |
| Fig file object. | |
| typedef struct _dkfig_font_ | dk_fig_font |
| Font. | |
| typedef struct _dk_fig_svg_pat_ | dk_fig_svg_pat |
| SVG fill pattern. | |
| typedef struct _dk_fig_svg_style_ | dk_fig_svg_style |
| SVG fill style. | |
| typedef struct _dk_fig_svg_attr_ | dk_fig_svg_attr |
| SVG attribute. | |
| typedef struct _dk_fig_svg_drve_ | dk_fig_svg_drve |
| SVG-driver-specific data for an object. | |
|
typedef struct _dkfig_pdf_output_instruction_ | dkfig_pdf_output_instruction |
| PDF output instruction. | |
Functions | |
| int | dkfig_opt_compare (void *p1, void *p2, int cr) |
| Compare two stored options by line number. | |
| void | dkfig_opt_delete (dk_fig_opt *o) |
| Destroy option structure, release memory. | |
| dk_fig_opt * | dkfig_opt_new (unsigned long number, char *text) |
| Create new option structure. | |
| char * | dkfig_opt_get_text (dk_fig_opt *o) |
| Retrieve text (key = value) from option structure. | |
| int | dkfig_opt_process_all (dk_fig_conversion *c) |
| Process all stored options. | |
| int | dkfig_opt_process_special_comment (dk_fig_conversion *c, char *line, char *dr, int atdoclevel) |
| Process one special comment (either for the entire drawing or before processing an object). | |
| char * | dkfig_opt_special_comment_contents (char *line, char *dr) |
| Retrieve special comment text (key = value) from special comment line (driverlist: key = value). | |
| int | dkfig_opt_show_config_file (dk_fig_conversion *c, char *fn) |
| Show configuration file contents. | |
| int | dkfig_opt_write_config_file (dk_fig_conversion *c, char *fn) |
| Write standard input to new configuration file. | |
| void | dkfig_co_cleanup (dk_fig_conversion *c) |
| Clean up conversion job structure before releasing the memory. | |
| void | dkfig_co_delete (dk_fig_conversion *c) |
| Cleanup up and release conversion job structure. | |
| int | dkfig_co_init (dk_fig_conversion *c, dk_app_t *a) |
| Initialize newly created conversion job structure, use default values and preferences obtained from. | |
| dk_fig_conversion * | dkfig_co_new (dk_app_t *a) |
| Allocate new dk_fig_conversion structure and initialize it. | |
| int | dkfig_co_apply_args (dk_fig_conversion *c, int argc, char **argv) |
| Apply command line arguments to conversion job. | |
| void | dkfig_co_showconf_app (dk_fig_conversion *c) |
| Show current configuration. | |
| int | dkfig_co_configure_app (dk_fig_conversion *c) |
| Save current configuration. | |
| int | dkfig_co_add_stream (dk_fig_conversion *c) |
| Add input stream contents to drawing. | |
| int | dkfig_co_run (dk_fig_conversion *c) |
| Load configuration file, process options and run conversion. | |
| int | dkfig_co_show_config_file (dk_fig_conversion *c) |
| Show the contents of the used configuration file on standard output. | |
| int | dkfig_co_write_config_file (dk_fig_conversion *c) |
| Save a configuration file read from standard input as user-specific configuration file. | |
| int | dkfig_object_compare (void *l, void *r, int cr) |
| Compare two Fig objects. | |
| int | color_cell_compare (void *l, void *r, int cr) |
| Compare two color cells. | |
| void | dkfig_delete_color_cell (dk_fig_colorcell *cc) |
| Delete color cell, release memory. | |
| dk_fig_object * | dkfig_object_new (unsigned long l, dk_fig_object *p, dk_storage_t *st, dk_storage_iterator_t *it) |
| Create Fig object structure. | |
| dk_fig_colorcell * | dkfig_new_color_cell (int n, int r, int g, int b) |
| Create new color cell structure. | |
| void | dkfig_delete (dk_fig_object *o) |
| Destroy drawing object including all contents. | |
| dk_fig_object * | dkfig_new (int uwp) |
| Create Fig object for entire drawing. | |
| int | dkfig_read_add_line (dk_fig_object *o, char *b, dk_fig_conversion *c) |
| Add one line to drawing structure. | |
| int | dkfig_read_input_finished (dk_fig_object *o, int n, int s, dk_fig_conversion *c) |
| Handle end of input. | |
| unsigned long | dkfig_rd_get_lineno (dk_fig_object *o) |
| Retrieve object line number (the line number in which the object was started). | |
| unsigned long | dkfig_rd_get_errl (dk_fig_object *o) |
| Retrieve line number of last error. | |
| int | dkfig_rd_get_errc (dk_fig_object *o) |
| Retrieve error code of last error. | |
| int | dkfig_set_input_filename (dk_fig_object *o, char *n) |
| Save input file name for later use. | |
| int | dkfig_read_prepare_for_input (dk_fig_object *o) |
| Initialize root object to parse input. | |
| int | dkfig_set_spline_segments (dk_fig_object *o, size_t n) |
| Set number of Bezier spline segments per X-spline segment. | |
| void | dkfig_rd_set_opts (dk_fig_drawing *d, unsigned long o) |
| Set options to drawing. | |
| void | dkfig_rd_set_ahlj (dk_fig_drawing *d, int ahlj) |
| Set arrowhead line join. | |
| dk_storage_t * | dkfig_flat_list (dk_fig_conversion *c, dk_fig_object *o) |
| Create flattened container of Fig objects in order of drawing. | |
| void | dkfig_rd_set_it_steps (dk_fig_drawing *d, unsigned long min, unsigned long max) |
| Set minimum and maximum number of iteration steps for arrowhead length on splines calculation. | |
| int | dkfig_output_eps (dk_fig_conversion *c) |
| EPS output driver function. | |
| int | dkfig_output_ps (dk_fig_conversion *c) |
| PS output driver function. | |
| int | dkfig_output_tex (dk_fig_conversion *c) |
| TeX output driver function. | |
| int | dkfig_output_bb (dk_fig_conversion *c) |
| Bounding box output driver function. | |
| void | dkfig_eps_correct_for_palette (dk_fig_dcc *dcc) |
| Correct a color cell for using a web optimized color palette. | |
| int | dkfig_output_pdf (dk_fig_conversion *c) |
| PDF output driver function. | |
| int | dkfig_output_mmp (dk_fig_conversion *c) |
| MMP (Multi-MetaPost) output driver function. | |
| int | dkfig_output_mp (dk_fig_conversion *c) |
| MetaPost output driver function. | |
| int | dkfig_output_svg (dk_fig_conversion *c) |
| SVG output driver function. | |
| int | dkfig_fnt_comp_fonth (void *pl, void *pr, int cr) |
| Compare two font handling structure. | |
| void | dkfig_fnt_fonth_for_text (dk_fig_fonth_t *f, int n, int s, dk_fig_text *t) |
| Fill font handling structure to match requirements of a Fig text object. | |
| dk_fig_fonth_t * | dkfig_fnt_new_fonth (void) |
| Create new font handling structure. | |
| dk_fig_fonth_t * | dkfig_fnt_copy_fonth (dk_fig_fonth_t *f) |
| Create a copy of a font handling structure. | |
| void | dkfig_fnt_del_fonth (dk_fig_fonth_t *f) |
| Delete font handling structure, release memory. | |
| int | dkfig_dt_tex_preamble (dk_fig_conversion *c, dk_stream_t *os) |
| Write LaTeX preamble to a stream. | |
| int | dkfig_dt_is_latex_text (dk_fig_fonth_t *fhptr) |
| Check whether or not the font handling requires LaTeX/TeX. | |
| size_t | dkfig_dt_needed_alpha (unsigned long num) |
| Find number of characters needed to string encode a number. | |
| void | dkfig_dt_write_fontname (dk_stream_t *os, dk_fig_drawing *drw, dk_fig_fonth_t *fhptr) |
| Write a font name to output stream. | |
| int | dkfig_dt_font_defs (dk_fig_conversion *c, dk_stream_t *os) |
| Write LaTeX commands for font definitions to output stream. | |
| void | dkfig_dt_begin_document (dk_fig_conversion *c, dk_stream_t *os) |
| Write begin{document} to output stream. | |
| int | dkfig_dt_need_tex_file (dk_fig_conversion *c) |
| Check whether or not there is any text in the drawing requiring the use of LaTeX/TeX. | |
| int | dkfig_dt_run_tex (dk_fig_conversion *c, dk_fig_drawing *d, dk_storage_iterator_t *it) |
| Write LaTeX/TeX file and run LaTeX/TeX. | |
| void | dkfig_dt_end_document (dk_fig_conversion *c, dk_stream_t *os) |
| Write end{document} sequence to output stream. | |
| int | dkfig_dt_font_redef (dk_fig_conversion *c, dk_stream_t *os, int r) |
| Write LaTeX commands for font definitions to output stream. | |
| int | dkfig_tool_invert_y (dk_fig_drawing *d) |
| Check whether or not to invert y coordinates. | |
| void | dkfig_tool_null_arrow (dk_fig_arrow *a) |
| Initialize arrowhead structure. | |
| int | dkfig_tool_calc_arrow (dk_fig_arrow *a, dk_fig_point *p, double phi, dk_fig_fpd *f, dk_fig_drawing *d, dk_fig_conversion *c) |
| Calculate arrowhead polygon points. | |
| void | dkfig_tool_null_fpd (dk_fig_fpd *p) |
| Initialize a fill, pattern and drawing structure. | |
| void | dkfig_tool_correct_for_plain_tex (dk_fig_conversion *c) |
| Correct all font handling structures for use with plain TeX. | |
| void | dkfig_tool_bb_reset (dk_fig_bb *bb) |
| Initialize a bounding box structure. | |
| void | dkfig_tool_bb_add_x (dk_fig_bb *bb, double x) |
| Add x value to bounding box. | |
| void | dkfig_tool_bb_add_y (dk_fig_bb *bb, double y) |
| Add y value to bounding box. | |
| double | dkfig_tool_bb_get_xmin (dk_fig_bb *bb) |
| Get minimum x value from bounding box structure. | |
| double | dkfig_tool_bb_get_xmax (dk_fig_bb *bb) |
| Get maximum x value from bounding box structure. | |
| double | dkfig_tool_bb_get_ymin (dk_fig_bb *bb) |
| Get minimum y value from bounding box structure. | |
| double | dkfig_tool_bb_get_ymax (dk_fig_bb *bb) |
| Get maximum y value from bounding box structure. | |
| int | dkfig_tool_bb_have_x (dk_fig_bb *bb) |
| Check: X values available in bounding box structure. | |
| int | dkfig_tool_bb_have_y (dk_fig_bb *bb) |
| Check: Y values available in bounding box structure. | |
| void | dkfig_tool_bb_add (dk_fig_bb *dest, dk_fig_bb *src) |
| Add object bounding box to drawing bounding box. | |
| void | dkfig_tool_arc_calc (dk_fig_arc_calc *arc) |
| Calculate bounding box for an arc in mathematical coordinates (positive y grow upwards). | |
| void | dkfig_tool_bb_arc (dk_fig_object *o, dk_fig_drawing *d) |
| Calculate bounding box for an arc in mathematical coordinates (positive y grow upwards). | |
| void | dkfig_tool_bb_polyline (dk_fig_object *o, dk_fig_drawing *d) |
| Calculate bounding box for polyline object. | |
| void | dkfig_tool_bb_ellipse (dk_fig_object *o, dk_fig_drawing *d) |
| Calculate bounding box for an ellipse object. | |
| void | dkfig_tool_bb_spline (dk_fig_object *o, dk_fig_drawing *d) |
| Calculate bounding box for a spline object. | |
| double | dkfig_tool_dist_pt_to_line0 (double xp, double yp, double x0, double y0) |
| Distance between point (xp,yp) and line (0,0)--(x0,y0). | |
| void | dkfig_tool_rotated_ellipse (dk_fig_rot_ellipse *e) |
| Calculate width and height of a rotated ellipse. | |
| int | dkfig_tool_build_one_spline (dk_fig_object *o, dk_fig_drawing *d, dk_fig_conversion *c) |
| Final step in spline processing: Shorten spline if necessary for arrowheads. | |
| void | dkfig_tool_null_arc_calc (dk_fig_arc_calc *c) |
| Initialize arc calculation structure. | |
| void | dkfig_tool_invert_arc_calc (dk_fig_arc_calc *c) |
| Invert the y values of the points. | |
| void | dkfig_tool_swap_arrows (dk_fig_fpd *fpd) |
| Swap arrowheads on an arc. | |
| int | dkfig_tool_arc_complete (dk_fig_object *o, dk_fig_drawing *d, dk_fig_conversion *c) |
| Final processing step on arcs: Shorten arc for arrowheads if necessary. | |
| int | dkfig_tool_polyline_complete (dk_fig_object *o, dk_fig_drawing *d, dk_fig_conversion *c) |
| Final processing step on polylines: Shorten line for arrowheads if necessary. | |
| void | dkfig_tool_fill_dcc (dk_fig_drawing *d, dk_fig_dcc *dcc, int n) |
| Fill color cell structure by retrieving data from Fig drawing color cell. | |
| void | dkfig_tool_correct_dcc (dk_fig_dcc *dcc, int colno, int af) |
| Correct a color cell structure for an object's area fill style (brightness, patterns. | |
| int | dkfig_tool_must_fill (int area_fill, unsigned long opt) |
| Check whether an object must be filled. | |
| int | dkfig_tool_must_pattern (int area_fill, unsigned long opt) |
| Check whether or not we need to draw fill patterns. | |
| int | dkfig_tool_num_as_string (dk_stream_t *os, unsigned long no, size_t lgt) |
| Write number encoded as string. | |
| void | dkfig_tool_delete_tex_files (dk_fig_conversion *c) |
| Remove temporary files used for special text processing. | |
| void | dkfig_tool_init_netpbm (dk_fig_conversion *c) |
| Initialize NetPBM library. | |
| dk_storage_t * | dkfig_tool2_image_width_storage (void) |
| Create storage container to store image width data. | |
| dkfig_bitmap_width * | dkfig_tool2_find_entry_for_width (dk_storage_iterator_t *it, long width, long height, int colored, int seprgb, int fl) |
| Find width structure for given image attributes. | |
| int | dkfig_tool2_add_image_width (dk_storage_t *st, dk_storage_iterator_t *it, long width, long height, int colored, int seprgb, int fl) |
| Add image width structure to storage. | |
| void | dkfig_tool2_combined_error_message (dk_fig_conversion *c, size_t i1, size_t i2, char *fn) |
| Error message: constant text, variable text and constant text. | |
| void | dkfig_tool2_simple_error_message (dk_fig_conversion *c, size_t i) |
| Error message: One constant text. | |
| void | dkfig_tool2_report_special_comment (dk_fig_conversion *c, dk_fig_opt *speccom, int i) |
| Report why the special comment can not be used. | |
| void | dkfig_tool2_report_unused_options (dk_fig_conversion *c) |
| Report unused options. | |
| int | dkfig_tool2_get_image_size (dk_fig_conversion *c, char *fn, unsigned long *w, unsigned long *h) |
| Retrieve image size. | |
| int | dkfig_tool2_obj_is_bg_rect (dk_fig_object *o, int wbgr) |
| Check whether or not an object is a background rectangle. | |
| void | dkfig_tool2_eps_error_message (dkfig_eps_output_instruction *oi, size_t i) |
| Error output function for the EPS driver. | |
| void | dkfig_tool2_svg_error_message (dkfig_svg_output_instruction *oi, size_t i) |
| Error output function for the SVG driver. | |
| void | dkfig_tool2_simple_progress_message (dk_fig_conversion *c, size_t i) |
| Progress message. | |
| double | dkfig_tool2_drd (double v, dk_fig_conversion *c, int w) |
| Double round with specified number of digits. | |
| int | dkfig_tool2_utf8_auto (dk_fig_conversion *c) |
| Retrieve UTF-8 enabled/disabled setting from LANG environment variable. | |
| int | dkfig_tool2_set_utf8 (dk_fig_conversion *c, char *v, int allow_auto) |
| Enable/disable UTF-8. | |
| void | dkfig_tool2_utf8_to_latex (dk_stream_t *os, dk_fig_conversion *c, char *t) |
| Write LaTeX representation of UTF-8 encoded string to output stream. | |
| void | dkfig_tool2_msg3 (dk_fig_conversion *c, int l, size_t s1, size_t s2, char *t) |
| Log message consisting of 2 constant parts and a variable one. | |
| void | dkfig_tool2_msg1 (dk_fig_conversion *c, int l, size_t s1) |
| Log message. | |
| dk_font_mapping_t * | dkfig_tool2_read_font_mapping (dk_fig_conversion *c) |
| Create font mapping from file. | |
| void | dkfig_eps_image_info_delete (dkfig_eps_image_info *i) |
| Delete image information used by EPS driver. | |
| dkfig_eps_image_info * | dkfig_eps_image_info_new (char *fn) |
| Create image information used by EPS driver. | |
| int | dkfig_eps_attach_image_info (dkfig_eps_output_instruction *oi, dk_fig_object *o) |
| Attach an information to an object. | |
| int | dkfig_ei_check_separated_strings (unsigned long w, unsigned long h) |
| Check whether or not we can use separated color streams for an image. | |
| int | dkfig_ei_get_image_type (char *fn) |
| Get image type. | |
| int | dkfigpi_prepare_image (dkfig_pdf_output_instruction *oi) |
| Prepare to show image. | |
| int | dkfig_output_java (dk_fig_conversion *c) |
| Java output driver function. | |
| #define DK_FIG_OBJ_ARC 5 |
Fig object: Arc.
| #define DK_FIG_OBJ_COLOR 0 |
Fig object: Color.
| #define DK_FIG_OBJ_COMPOUND 6 |
Fig object: Compound (group of objects).
| #define DK_FIG_OBJ_DRAWING 255 |
Fig object: Drawing.
| #define DK_FIG_OBJ_ELLIPSE 1 |
Fig object: Ellipse.
| #define DK_FIG_OBJ_POLYLINE 2 |
Fig object: Polyline.
| #define DK_FIG_OBJ_SPLINE 3 |
Fig object: Spline.
| #define DK_FIG_OBJ_TEXT 4 |
Fig object: Text.
| #define DKFIG_ALIGN_H_CENTERED 1 |
Horizontal alignment: centered.
| #define DKFIG_ALIGN_H_LEFT 0 |
Horizontal alignment: left.
| #define DKFIG_ALIGN_H_RIGHT 2 |
Horizontal alignment: right.
| #define DKFIG_ALIGN_V_BOTTOM 2 |
Vertical alignment: bottom.
| #define DKFIG_ALIGN_V_CENTERED 1 |
Vertical alignment: centered.
| #define DKFIG_ALIGN_V_TOP 0 |
Vertical alignment: top.
| #define DKFIG_TH_HANDLING 16 |
Text handling: LaTeX/TeX font name, not PS .
.. font name.
| #define DKFIG_WHAT_APP |
Value:
(\ DKFIG_WHAT_VERSION \ | DKFIG_WHAT_HELP \ | DKFIG_WHAT_CONFIGURE \ | DKFIG_WHAT_UNCONFIGURE \ | DKFIG_WHAT_SHOWCONF \ | DKFIG_WHAT_CONFIG_FILE \ | DKFIG_WHAT_WRITE_CONFIG_FILE \ )
| int color_cell_compare | ( | void * | l, | |
| void * | r, | |||
| int | cr | |||
| ) |
Compare two color cells.
| l | Left color cell. | |
| r | Right color cell or color number. | |
| cr | Comparison criteria (1=color/number, default=color/color). |
| int dkfig_co_add_stream | ( | dk_fig_conversion * | c | ) |
Add input stream contents to drawing.
| c | Conversion job structure |
| int dkfig_co_apply_args | ( | dk_fig_conversion * | c, | |
| int | argc, | |||
| char ** | argv | |||
| ) |
Apply command line arguments to conversion job.
| c | Conversion job structure. | |
| argc | Number of command line arguments. | |
| argv | Command line arguments array. |
| void dkfig_co_cleanup | ( | dk_fig_conversion * | c | ) |
Clean up conversion job structure before releasing the memory.
This function is invoked from dkfig_co_delete() or dkfig_co_new().
| c | Conversion job structure. |
| int dkfig_co_configure_app | ( | dk_fig_conversion * | c | ) |
Save current configuration.
| c | Conversion job structure. |
| void dkfig_co_delete | ( | dk_fig_conversion * | c | ) |
Cleanup up and release conversion job structure.
| c | Conversion job structure. |
| int dkfig_co_init | ( | dk_fig_conversion * | c, | |
| dk_app_t * | a | |||
| ) |
Initialize newly created conversion job structure, use default values and preferences obtained from.
| c | New conversion job structure. | |
| a | Application structure. |
| dk_fig_conversion* dkfig_co_new | ( | dk_app_t * | a | ) |
Allocate new dk_fig_conversion structure and initialize it.
| a | Application structure. |
| int dkfig_co_run | ( | dk_fig_conversion * | c | ) |
Load configuration file, process options and run conversion.
| c | Conversion job structure. |
| int dkfig_co_show_config_file | ( | dk_fig_conversion * | c | ) |
Show the contents of the used configuration file on standard output.
A GUI wrapped around fig2vect may run "fig2vect --configuration-file" to see the driver configurations and the configuration settings.
| c | Conversion job structure. |
| void dkfig_co_showconf_app | ( | dk_fig_conversion * | c | ) |
Show current configuration.
| c | Configuration job structure. |
| int dkfig_co_write_config_file | ( | dk_fig_conversion * | c | ) |
Save a configuration file read from standard input as user-specific configuration file.
A GUI wrapped around fig2vect may allow the user to create driver configurations and passes the configuration file contents as standard input to "fig2vect --write-configuration-file".
| c | Conversion job structure. |
| void dkfig_delete | ( | dk_fig_object * | o | ) |
Destroy drawing object including all contents.
| o | Drawing root object. |
| void dkfig_delete_color_cell | ( | dk_fig_colorcell * | cc | ) |
Delete color cell, release memory.
| cc | Color cell. |
| void dkfig_dt_begin_document | ( | dk_fig_conversion * | c, | |
| dk_stream_t * | os | |||
| ) |
Write begin{document} to output stream.
| c | Conversion job structure. | |
| os | Output stream. |
| void dkfig_dt_end_document | ( | dk_fig_conversion * | c, | |
| dk_stream_t * | os | |||
| ) |
Write end{document} sequence to output stream.
| c | Conversion job structure. | |
| os | Output stream. |
| int dkfig_dt_font_defs | ( | dk_fig_conversion * | c, | |
| dk_stream_t * | os | |||
| ) |
Write LaTeX commands for font definitions to output stream.
| c | Conversion job structure. | |
| os | Output stream. |
| int dkfig_dt_font_redef | ( | dk_fig_conversion * | c, | |
| dk_stream_t * | os, | |||
| int | r | |||
| ) |
Write LaTeX commands for font definitions to output stream.
| c | Conversion job structure. | |
| os | Output stream. | |
| r | Flag: redefinition (1) or definition (0). |
| int dkfig_dt_is_latex_text | ( | dk_fig_fonth_t * | fhptr | ) |
Check whether or not the font handling requires LaTeX/TeX.
| fhptr | Font handling structure. |
| int dkfig_dt_need_tex_file | ( | dk_fig_conversion * | c | ) |
Check whether or not there is any text in the drawing requiring the use of LaTeX/TeX.
| c | Conversion job structure. |
| size_t dkfig_dt_needed_alpha | ( | unsigned long | num | ) |
Find number of characters needed to string encode a number.
| num | Number to encode. |
| int dkfig_dt_run_tex | ( | dk_fig_conversion * | c, | |
| dk_fig_drawing * | d, | |||
| dk_storage_iterator_t * | it | |||
| ) |
Write LaTeX/TeX file and run LaTeX/TeX.
| c | Conversion job structure. | |
| d | Fig drawing structure. | |
| it | Iterator to flattened Fig objects container. |
| int dkfig_dt_tex_preamble | ( | dk_fig_conversion * | c, | |
| dk_stream_t * | os | |||
| ) |
Write LaTeX preamble to a stream.
| c | Conversion job structure. | |
| os | Output stream. |
| void dkfig_dt_write_fontname | ( | dk_stream_t * | os, | |
| dk_fig_drawing * | drw, | |||
| dk_fig_fonth_t * | fhptr | |||
| ) |
Write a font name to output stream.
The font number is encoded as character sequence.
| os | Output stream. | |
| drw | Fig drawing structure. | |
| fhptr | Font handling structure. |
| int dkfig_ei_check_separated_strings | ( | unsigned long | w, | |
| unsigned long | h | |||
| ) |
Check whether or not we can use separated color streams for an image.
| w | Image width. | |
| h | Image height. |
| int dkfig_ei_get_image_type | ( | char * | fn | ) |
Get image type.
| fn | Image file name. |
| int dkfig_eps_attach_image_info | ( | dkfig_eps_output_instruction * | oi, | |
| dk_fig_object * | o | |||
| ) |
Attach an information to an object.
For each object showing an image we have to store width/height/colors/bits per components.
| oi | EPS output instruction structure. | |
| o | Current object. |
| void dkfig_eps_correct_for_palette | ( | dk_fig_dcc * | dcc | ) |
Correct a color cell for using a web optimized color palette.
| dcc | Color cell to correct. |
| void dkfig_eps_image_info_delete | ( | dkfig_eps_image_info * | i | ) |
Delete image information used by EPS driver.
| i | Image information. |
| dkfig_eps_image_info* dkfig_eps_image_info_new | ( | char * | fn | ) |
Create image information used by EPS driver.
| fn | Name of image file. |
| dk_storage_t* dkfig_flat_list | ( | dk_fig_conversion * | c, | |
| dk_fig_object * | o | |||
| ) |
Create flattened container of Fig objects in order of drawing.
| c | Conversion job structure. | |
| o | Drawing root object. |
| int dkfig_fnt_comp_fonth | ( | void * | pl, | |
| void * | pr, | |||
| int | cr | |||
| ) |
Compare two font handling structure.
Comparison by handling type, font number, font size, original font number and font flags.
| pl | Left font handling structure. | |
| pr | Right font handling structure. | |
| cr | Comparison criteria (ignored). |
| dk_fig_fonth_t* dkfig_fnt_copy_fonth | ( | dk_fig_fonth_t * | f | ) |
Create a copy of a font handling structure.
| f | Source font handling structure. |
| void dkfig_fnt_del_fonth | ( | dk_fig_fonth_t * | f | ) |
Delete font handling structure, release memory.
| f | Font handling structure to delete. |
| void dkfig_fnt_fonth_for_text | ( | dk_fig_fonth_t * | f, | |
| int | n, | |||
| int | s, | |||
| dk_fig_text * | t | |||
| ) |
Fill font handling structure to match requirements of a Fig text object.
| f | Destination font handling structure. | |
| n | Text handling type for normal texts. | |
| s | Text handling type for special texts. | |
| t | Fig text object. |
| dk_fig_fonth_t* dkfig_fnt_new_fonth | ( | void | ) |
Create new font handling structure.
| dk_fig_object* dkfig_new | ( | int | uwp | ) |
Create Fig object for entire drawing.
| uwp | Flag: Use web-optimized color palette. |
| dk_fig_colorcell* dkfig_new_color_cell | ( | int | n, | |
| int | r, | |||
| int | g, | |||
| int | b | |||
| ) |
Create new color cell structure.
| n | Color number. | |
| r | Red component. | |
| g | Green component. | |
| b | Blue component. |
| int dkfig_object_compare | ( | void * | l, | |
| void * | r, | |||
| int | cr | |||
| ) |
Compare two Fig objects.
Comparison by layer number (largest layer number is lowest layer), object type, line style and source file line number.
| l | Left object. | |
| r | Right object. | |
| cr | Comparison criteria. |
| l | Left object. | |
| r | Right object. | |
| cr | Comparison criteria |
| dk_fig_object* dkfig_object_new | ( | unsigned long | l, | |
| dk_fig_object * | p, | |||
| dk_storage_t * | st, | |||
| dk_storage_iterator_t * | it | |||
| ) |
Create Fig object structure.
| l | Line number in source file. | |
| p | Parent object (drawing or compound). | |
| st | Storage for special comments. | |
| it | Iterator for special comments storage. |
| int dkfig_opt_compare | ( | void * | p1, | |
| void * | p2, | |||
| int | cr | |||
| ) |
Compare two stored options by line number.
| p1 | Pointer to left option structure. | |
| p2 | Pointer to right option structure. | |
| cr | Comparison criteria, 1=pointer/lineno, default=pointer/pointer. |
| p1 | Pointer to left option. | |
| p2 | Pointer to right options. | |
| cr | Comparison criteria, 1=pointer/lineno, default=pointer/pointer. |
| void dkfig_opt_delete | ( | dk_fig_opt * | o | ) |
Destroy option structure, release memory.
| o | Option structure to destroy. |
| char* dkfig_opt_get_text | ( | dk_fig_opt * | o | ) |
Retrieve text (key = value) from option structure.
| o | Option structure. |
| dk_fig_opt* dkfig_opt_new | ( | unsigned long | number, | |
| char * | text | |||
| ) |
Create new option structure.
Option structures created by this function must be destroyed using dkfig_opt_delete().
| number | Line number of option in config file. | |
| text | Text line (key = value). |
| int dkfig_opt_process_all | ( | dk_fig_conversion * | c | ) |
Process all stored options.
Walk through all 4 option storages (general defaults, base driver options, driver options and command line arguments) and apply the settings to the conversion job structure.
| c | Conversion job structure. |
| int dkfig_opt_process_special_comment | ( | dk_fig_conversion * | c, | |
| char * | line, | |||
| char * | dr, | |||
| int | atdoclevel | |||
| ) |
Process one special comment (either for the entire drawing or before processing an object).
| c | Conversion job structure. | |
| line | Special comment. | |
| dr | Driver name. | |
| atdoclevel | Flag: at document level. |
| int dkfig_opt_show_config_file | ( | dk_fig_conversion * | c, | |
| char * | fn | |||
| ) |
Show configuration file contents.
| c | Conversion job structure. | |
| fn | File name. |
| char* dkfig_opt_special_comment_contents | ( | char * | line, | |
| char * | dr | |||
| ) |
Retrieve special comment text (key = value) from special comment line (driverlist: key = value).
| line | Text line to inspect. | |
| dr | Name of the current driver. |
| int dkfig_opt_write_config_file | ( | dk_fig_conversion * | c, | |
| char * | fn | |||
| ) |
Write standard input to new configuration file.
| c | Conversion job structure. | |
| fn | File name |
| int dkfig_output_bb | ( | dk_fig_conversion * | c | ) |
Bounding box output driver function.
| c | Conversion job structure. |
| int dkfig_output_eps | ( | dk_fig_conversion * | c | ) |
EPS output driver function.
| c | Conversion job structure. |
| int dkfig_output_java | ( | dk_fig_conversion * | c | ) |
Java output driver function.
| c | Conversion job structure. |
| int dkfig_output_mmp | ( | dk_fig_conversion * | c | ) |
MMP (Multi-MetaPost) output driver function.
| c | Conversion job structure. |
| int dkfig_output_mp | ( | dk_fig_conversion * | c | ) |
MetaPost output driver function.
| c | Conversion job structure. |
| int dkfig_output_pdf | ( | dk_fig_conversion * | c | ) |
PDF output driver function.
| c | Conversion job structure. |
| int dkfig_output_ps | ( | dk_fig_conversion * | c | ) |
PS output driver function.
| c | Conversion job structure. |
| int dkfig_output_svg | ( | dk_fig_conversion * | c | ) |
SVG output driver function.
| c | Conversion job structure. |
| int dkfig_output_tex | ( | dk_fig_conversion * | c | ) |
TeX output driver function.
| c | Conversion job structure. |
| int dkfig_rd_get_errc | ( | dk_fig_object * | o | ) |
Retrieve error code of last error.
| o | Drawing root object. |
| unsigned long dkfig_rd_get_errl | ( | dk_fig_object * | o | ) |
Retrieve line number of last error.
| o | Drawing root object. |
| unsigned long dkfig_rd_get_lineno | ( | dk_fig_object * | o | ) |
Retrieve object line number (the line number in which the object was started).
| o | Fig object structure. |
| void dkfig_rd_set_ahlj | ( | dk_fig_drawing * | d, | |
| int | ahlj | |||
| ) |
Set arrowhead line join.
| d | Fig drawing structure. | |
| ahlj | The arrowhead line join. |
| void dkfig_rd_set_it_steps | ( | dk_fig_drawing * | d, | |
| unsigned long | min, | |||
| unsigned long | max | |||
| ) |
Set minimum and maximum number of iteration steps for arrowhead length on splines calculation.
| d | Fig drawing structure. | |
| min | Mininum number of steps. | |
| max | Maximum number of steps. |
| void dkfig_rd_set_opts | ( | dk_fig_drawing * | d, | |
| unsigned long | o | |||
| ) |
Set options to drawing.
| d | Fig drawing structure. | |
| o | Options as obtained from conversion job structure. |
| int dkfig_read_add_line | ( | dk_fig_object * | o, | |
| char * | b, | |||
| dk_fig_conversion * | c | |||
| ) |
Add one line to drawing structure.
| o | Fig drawing root object. | |
| b | Buffer containing the line to add. | |
| c | Conversion job structure. |
| int dkfig_read_input_finished | ( | dk_fig_object * | o, | |
| int | n, | |||
| int | s, | |||
| dk_fig_conversion * | c | |||
| ) |
Handle end of input.
Check parser state (last object must be finished) and prepare some structures for text handling.
| o | Fig drawing root object. | |
| n | Text handling type for normal texts. | |
| s | Text handling type for special texts. | |
| c | Conversion job structure. |
| int dkfig_read_prepare_for_input | ( | dk_fig_object * | o | ) |
Initialize root object to parse input.
| o | Drawing root object. |
| int dkfig_set_input_filename | ( | dk_fig_object * | o, | |
| char * | n | |||
| ) |
Save input file name for later use.
| o | Drawing root object. | |
| n | File name. |
| int dkfig_set_spline_segments | ( | dk_fig_object * | o, | |
| size_t | n | |||
| ) |
Set number of Bezier spline segments per X-spline segment.
| o | Drawing root object. | |
| n | Number of segments. |
| int dkfig_tool2_add_image_width | ( | dk_storage_t * | st, | |
| dk_storage_iterator_t * | it, | |||
| long | width, | |||
| long | height, | |||
| int | colored, | |||
| int | seprgb, | |||
| int | fl | |||
| ) |
Add image width structure to storage.
| st | Image width data storage. | |
| it | Image width data storage iterator. | |
| width | Image width. | |
| height | Image height. | |
| colored | Flag: Colored. | |
| seprgb | Flag: Separated color channels. | |
| fl | Flip information. |
| void dkfig_tool2_combined_error_message | ( | dk_fig_conversion * | c, | |
| size_t | i1, | |||
| size_t | i2, | |||
| char * | fn | |||
| ) |
Error message: constant text, variable text and constant text.
| c | Conversion job structure. | |
| i1 | First constant text index. | |
| i2 | Second constant text index. | |
| fn | Variable text. |
| double dkfig_tool2_drd | ( | double | v, | |
| dk_fig_conversion * | c, | |||
| int | w | |||
| ) |
Double round with specified number of digits.
| v | Value to round. | |
| c | Conversion job structure. | |
| w | Rounding type (1=coordinate, 2=coordinate obtained from trigonometric calculation, default=color). |
| void dkfig_tool2_eps_error_message | ( | dkfig_eps_output_instruction * | oi, | |
| size_t | i | |||
| ) |
Error output function for the EPS driver.
| oi | EPS output instruction structure. | |
| i | Index of error message. |
| dkfig_bitmap_width* dkfig_tool2_find_entry_for_width | ( | dk_storage_iterator_t * | it, | |
| long | width, | |||
| long | height, | |||
| int | colored, | |||
| int | seprgb, | |||
| int | fl | |||
| ) |
Find width structure for given image attributes.
| it | Image width data storage iterator. | |
| width | Image width. | |
| height | Image height. | |
| colored | Flag: Colored. | |
| seprgb | Flag: Separated color channels. | |
| fl | Flip information. |
| int dkfig_tool2_get_image_size | ( | dk_fig_conversion * | c, | |
| char * | fn, | |||
| unsigned long * | w, | |||
| unsigned long * | h | |||
| ) |
Retrieve image size.
| c | Conversion job structure. | |
| fn | Image file name. | |
| w | Pointer to width result variable. | |
| h | Pointer to height result variable. |
| dk_storage_t* dkfig_tool2_image_width_storage | ( | void | ) |
Create storage container to store image width data.
| void dkfig_tool2_msg1 | ( | dk_fig_conversion * | c, | |
| int | l, | |||
| size_t | s1 | |||
| ) |
Log message.
| c | Conversion job structure. | |
| l | Log level (DK_LOG_LEVEL_xxx). | |
| s1 | Index of message text. |
| void dkfig_tool2_msg3 | ( | dk_fig_conversion * | c, | |
| int | l, | |||
| size_t | s1, | |||
| size_t | s2, | |||
| char * | t | |||
| ) |
Log message consisting of 2 constant parts and a variable one.
| c | Conversion job structure. | |
| l | Log level (DK_LOG_LEVEL_xxx). | |
| s1 | Index of first (constant) part. | |
| s2 | Index of third (constant) part. | |
| t | Second (variable) part of the message. |
| int dkfig_tool2_obj_is_bg_rect | ( | dk_fig_object * | o, | |
| int | wbgr | |||
| ) |
Check whether or not an object is a background rectangle.
| o | Object to inspect. | |
| wbgr | Flag: Background rectangle uses color white instead of default. |
| dk_font_mapping_t* dkfig_tool2_read_font_mapping | ( | dk_fig_conversion * | c | ) |
Create font mapping from file.
| c | Conversion structure. |
| void dkfig_tool2_report_special_comment | ( | dk_fig_conversion * | c, | |
| dk_fig_opt * | speccom, | |||
| int | i | |||
| ) |
Report why the special comment can not be used.
| c | Conversion job structure. | |
| speccom | Special comment/option structure. | |
| i | Failure reason. |
| void dkfig_tool2_report_unused_options | ( | dk_fig_conversion * | c | ) |
Report unused options.
| c | Conversion job structure. |
| int dkfig_tool2_set_utf8 | ( | dk_fig_conversion * | c, | |
| char * | v, | |||
| int | allow_auto | |||
| ) |
Enable/disable UTF-8.
| c | Conversion job structure. | |
| v | Text containing either a boolean or "auto". | |
| allow_auto | Flag: Allow automatic detection of UTF-8 setting. |
| void dkfig_tool2_simple_error_message | ( | dk_fig_conversion * | c, | |
| size_t | i | |||
| ) |
Error message: One constant text.
| c | Conversion job structure. | |
| i | Text index. |
| void dkfig_tool2_simple_progress_message | ( | dk_fig_conversion * | c, | |
| size_t | i | |||
| ) |
Progress message.
| c | Conversion job structure. | |
| i | Message index. |
| void dkfig_tool2_svg_error_message | ( | dkfig_svg_output_instruction * | oi, | |
| size_t | i | |||
| ) |
Error output function for the SVG driver.
| oi | SVG output instruction structure. | |
| i | Index of error message. |
| int dkfig_tool2_utf8_auto | ( | dk_fig_conversion * | c | ) |
Retrieve UTF-8 enabled/disabled setting from LANG environment variable.
| c | Conversion job structure. |
| void dkfig_tool2_utf8_to_latex | ( | dk_stream_t * | os, | |
| dk_fig_conversion * | c, | |||
| char * | t | |||
| ) |
Write LaTeX representation of UTF-8 encoded string to output stream.
| os | Output stream. | |
| c | Conversion job structure. | |
| t | UTF-8 encoded string. |
| void dkfig_tool_arc_calc | ( | dk_fig_arc_calc * | arc | ) |
Calculate bounding box for an arc in mathematical coordinates (positive y grow upwards).
| arc | Arc calculation structure. |
| int dkfig_tool_arc_complete | ( | dk_fig_object * | o, | |
| dk_fig_drawing * | d, | |||
| dk_fig_conversion * | c | |||
| ) |
Final processing step on arcs: Shorten arc for arrowheads if necessary.
| o | Arc object. | |
| d | Fig drawing structure. | |
| c | Conversion job structure. |
Add object bounding box to drawing bounding box.
| dest | Destination bounding box (drawing). | |
| src | Source bounding box (object). |
| void dkfig_tool_bb_add_x | ( | dk_fig_bb * | bb, | |
| double | x | |||
| ) |
Add x value to bounding box.
| bb | Bounding box structure. | |
| x | X value to add. |
| void dkfig_tool_bb_add_y | ( | dk_fig_bb * | bb, | |
| double | y | |||
| ) |
Add y value to bounding box.
| bb | Bounding box structure. | |
| y | Y value to add. |
| void dkfig_tool_bb_arc | ( | dk_fig_object * | o, | |
| dk_fig_drawing * | d | |||
| ) |
Calculate bounding box for an arc in mathematical coordinates (positive y grow upwards).
| o | Arc object. | |
| d | Fig drawing structure. |
| void dkfig_tool_bb_ellipse | ( | dk_fig_object * | o, | |
| dk_fig_drawing * | d | |||
| ) |
Calculate bounding box for an ellipse object.
| o | Ellipse object. | |
| d | Fig drawing structure. |
| double dkfig_tool_bb_get_xmax | ( | dk_fig_bb * | bb | ) |
Get maximum x value from bounding box structure.
| bb | Bounding box structure. |
| double dkfig_tool_bb_get_xmin | ( | dk_fig_bb * | bb | ) |
Get minimum x value from bounding box structure.
| bb | Bounding box structure. |
| double dkfig_tool_bb_get_ymax | ( | dk_fig_bb * | bb | ) |
Get maximum y value from bounding box structure.
| bb | Bounding box structure. |
| double dkfig_tool_bb_get_ymin | ( | dk_fig_bb * | bb | ) |
Get minimum y value from bounding box structure.
| bb | Bounding box structure. |
| int dkfig_tool_bb_have_x | ( | dk_fig_bb * | bb | ) |
Check: X values available in bounding box structure.
| bb | Bounding box structure. |
| int dkfig_tool_bb_have_y | ( | dk_fig_bb * | bb | ) |
Check: Y values available in bounding box structure.
| bb | Bounding box structure. |
| void dkfig_tool_bb_polyline | ( | dk_fig_object * | o, | |
| dk_fig_drawing * | d | |||
| ) |
Calculate bounding box for polyline object.
| o | Polyline object. | |
| d | Fig drawing structure. |
| void dkfig_tool_bb_reset | ( | dk_fig_bb * | bb | ) |
Initialize a bounding box structure.
| bb | Structure to initialize. |
| void dkfig_tool_bb_spline | ( | dk_fig_object * | o, | |
| dk_fig_drawing * | d | |||
| ) |
Calculate bounding box for a spline object.
| o | Spline object. | |
| d | Fig drawing structure. |
| int dkfig_tool_build_one_spline | ( | dk_fig_object * | o, | |
| dk_fig_drawing * | d, | |||
| dk_fig_conversion * | c | |||
| ) |
Final step in spline processing: Shorten spline if necessary for arrowheads.
| o | Spline object. | |
| d | Fig drawing object. | |
| c | Conversion job structure. |
| int dkfig_tool_calc_arrow | ( | dk_fig_arrow * | a, | |
| dk_fig_point * | p, | |||
| double | phi, | |||
| dk_fig_fpd * | f, | |||
| dk_fig_drawing * | d, | |||
| dk_fig_conversion * | c | |||
| ) |
Calculate arrowhead polygon points.
| a | Arrowhead structure (destination). | |
| p | Arrowhead end point. | |
| phi | Direction at the end of line. | |
| f | Objects filling, pattern and drawing. | |
| d | Fig drawing structure. | |
| c | Conversion job structure. |
| void dkfig_tool_correct_dcc | ( | dk_fig_dcc * | dcc, | |
| int | colno, | |||
| int | af | |||
| ) |
Correct a color cell structure for an object's area fill style (brightness, patterns.
..)
| dcc | Color cell. | |
| colno | Color number. | |
| af | Object's area fill style. |
| void dkfig_tool_correct_for_plain_tex | ( | dk_fig_conversion * | c | ) |
Correct all font handling structures for use with plain TeX.
| c | Conversion job structure. |
| void dkfig_tool_delete_tex_files | ( | dk_fig_conversion * | c | ) |
Remove temporary files used for special text processing.
| c | Conversion job structure. |
| double dkfig_tool_dist_pt_to_line0 | ( | double | xp, | |
| double | yp, | |||
| double | x0, | |||
| double | y0 | |||
| ) |
Distance between point (xp,yp) and line (0,0)--(x0,y0).
| xp | Point x value. | |
| yp | Point y value. | |
| x0 | Line endpoint x value. | |
| y0 | Line endpoint y value. |
| void dkfig_tool_fill_dcc | ( | dk_fig_drawing * | d, | |
| dk_fig_dcc * | dcc, | |||
| int | n | |||
| ) |
Fill color cell structure by retrieving data from Fig drawing color cell.
| d | Fig drawing structure. | |
| dcc | Destination color cell. | |
| n | Color cell number. |
| void dkfig_tool_init_netpbm | ( | dk_fig_conversion * | c | ) |
Initialize NetPBM library.
| c | Conversion job structure. |
| void dkfig_tool_invert_arc_calc | ( | dk_fig_arc_calc * | c | ) |
Invert the y values of the points.
| c | Arc calculation structure. |
| int dkfig_tool_invert_y | ( | dk_fig_drawing * | d | ) |
Check whether or not to invert y coordinates.
| d | Fig drawing structure. |
| int dkfig_tool_must_fill | ( | int | area_fill, | |
| unsigned long | opt | |||
| ) |
Check whether an object must be filled.
| area_fill | Object's area fill style. | |
| opt | Object options, checked for DKFIG_OPT_FILL_PATTERNS. |
| int dkfig_tool_must_pattern | ( | int | area_fill, | |
| unsigned long | opt | |||
| ) |
Check whether or not we need to draw fill patterns.
| area_fill | Object's area fill style. | |
| opt | Object options, checked for DKFIG_OPT_FILL_PATTERNS. |
| void dkfig_tool_null_arc_calc | ( | dk_fig_arc_calc * | c | ) |
Initialize arc calculation structure.
| c | Arc calculation structure. |
| void dkfig_tool_null_arrow | ( | dk_fig_arrow * | a | ) |
Initialize arrowhead structure.
| a | Arrowhead structure. |
| void dkfig_tool_null_fpd | ( | dk_fig_fpd * | p | ) |
Initialize a fill, pattern and drawing structure.
| p | Structure to initialize. |
| int dkfig_tool_num_as_string | ( | dk_stream_t * | os, | |
| unsigned long | no, | |||
| size_t | lgt | |||
| ) |
Write number encoded as string.
| os | Output stream to write to. | |
| no | Number value. | |
| lgt | String length. |
| int dkfig_tool_polyline_complete | ( | dk_fig_object * | o, | |
| dk_fig_drawing * | d, | |||
| dk_fig_conversion * | c | |||
| ) |
Final processing step on polylines: Shorten line for arrowheads if necessary.
| o | Polyline object. | |
| d | Fig drawing structure. | |
| c | Conversion job structure. |
| void dkfig_tool_rotated_ellipse | ( | dk_fig_rot_ellipse * | e | ) |
Calculate width and height of a rotated ellipse.
The ellipse parameters rx, ry and phi0 (radians) are used as calculation input, output is stored in w and h (center to right, center to top).
| e | Ellipse object. |
| void dkfig_tool_swap_arrows | ( | dk_fig_fpd * | fpd | ) |
Swap arrowheads on an arc.
MetaPost requires to draw arcs in positive (counterclockwise) direction. If an arc is specified in clockwise direction to use "fill arrowhead p withcolor ...".
| fpd | Fill, pattern and draw structure. |
| int dkfigpi_prepare_image | ( | OI * | oi | ) |
Prepare to show image.
| oi | PDF output instruction structure. |
1.5.8