/* Copyright (C) 2013-2020, Dirk Krause SPDX-License-Identifier: BSD-3-Clause */ /* WARNING: This file was generated by the dkct program (see http://dktools.sourceforge.net/ for details). Changes you make here will be lost if dkct is run again! You should modify the original source and run dkct on it. Original source: f2lto.ctr */ /** @file f2lto.h Header file for the f2lto module. */ #ifndef F2LTO_H_INCLUDED /** Avoid multiple inclusions. */ #define F2LTO_H_INCLUDED 1 #line 9 "f2lto.ctr" #ifdef __cplusplus extern "C" { #endif /** Register PS font in a storage. @param sFonts Fonts storage. @param iFonts Storage iterator. @param nFonts Pointer to variable for total number of used fonts. @param fontno PS font number. @param fontsize Font size. @param app Application structure for diagnostics. @return Pointer to text handling on success, NULL on error. */ f2l_text_handling_t * f2l_tool_register_font( dk3_sto_t *sFonts, dk3_sto_it_t *iFonts, unsigned long *nFonts, int fontno, double fontsize, dk3_app_t *app ); /** Start LaTeX part of EPS+TEX or PDF+TEX. @param of Output file. @param job Job structure. @param shortOutFile Short output file name of EPS or PDF file. @param iFonts Font storage iterator. @param nFonts Total number of fonts. */ void f2l_tool_start_tex_part( FILE *of, f2l_job_t *job, char const *shortOutFile, dk3_sto_it_t *iFonts, unsigned long nFonts ); /** Start LaTeX part of EPS+TEX, PDF+TEX or PGF. @param of Output file. @param job Job structure. @param shortOutFile Short output file name of EPS or PDF file. @param iFonts Font storage iterator. @param nFonts Total number of fonts. @param wp Flag: With picture environments. */ void f2l_tool_start_tex_part_with_picture( FILE *of, f2l_job_t *job, char const *shortOutFile, dk3_sto_it_t *iFonts, unsigned long nFonts, int wp ); /** End LaTeX part of EPS+TEX or PDF+TEX. @param of Output file. */ void f2l_tool_end_tex_part( FILE *of ); /** Write one font name. @param of Output file. @param fontno Number of font to write. @param nFonts Total number of font definitions. */ void f2l_tool_write_font_name( FILE *of, unsigned long fontno, unsigned long nFonts ); /** Write inner part of text object. This function is used both for writing to a picture environment in a *.tex file and pgf text labels. @param of Output file. @param job Job structure. @param drw Drawing structure. @param obj Text object. @param nFonts Total number of PS fonts. */ void f2l_tool_inner_text_object( FILE *of, f2l_job_t *job, dk3_fig_drawing_t *drw, dk3_fig_obj_t *obj, unsigned long nFonts ); /** Write one text object to LaTeX output in a picture environment. @param of Output file. @param job Job structure. @param drw Drawing structure. @param obj Text object. @param x X position. @param y Y position. @param nFonts Total number of PS fonts. */ void f2l_tool_text_object( FILE *of, f2l_job_t *job, dk3_fig_drawing_t *drw, dk3_fig_obj_t *obj, double x, double y, unsigned long nFonts ); /** Write string to LaTeX output. @param of Output file. @param txt String, ISO-LATIN-1 encoded. */ void f2l_tool_tex_string( FILE *of, char const *txt ); /** Create image file data. @param filename File name. @param app Application structure for diagnostics. @param li Line number of object definition. @return Pointer to image file data on success, NULL on error. */ f2l_image_t * f2l_tool_image_new(char const *filename, dk3_app_t *app, unsigned long li); /** Destroy image data. @param im Image data to destroy. */ void f2l_tool_image_delete(f2l_image_t *im); /** Compare two image entries. @param l Left image entry. @param r Right image entry or unique file identifier. @param cr Comparison criteria (0=image/image, 1=image/ufi). @return Comparison result. */ int f2l_tool_compare_images(void const *l, void const *r, int cr); /** Set exit status code to error code if exit status indicates success. @param job Job structure. @param exval Error code. */ void f2l_tool_set_exit_status(f2l_job_t *job, int exval); /** Begin LaTeX document (write document preamble and begin document line). @param of Output file. @param job Job structure. */ void f2l_tool_begin_latex_document( FILE *of, f2l_job_t *job ); /** End LaTeX document (write end document line). @param of Output file. */ void f2l_tool_end_latex_document( FILE *of ); /** Find drawing direction for embedded image. @param drw Drawing structure. @param obj Current object to process. @param ec Pointer to error code variable, may be NULL. @return Drawing direction. */ int f2lto_find_draw_direction( dk3_fig_drawing_t *drw, dk3_fig_obj_t *obj, int *ec ); /** Find suitable length for gaps in line styles. @param job Job structure. @param lw Line width. @param lsv Style value. @return Gap length. */ double f2lto_find_gap_length(f2l_job_t *job, double lw, double lsv); #ifdef __cplusplus } #endif #endif