Issue #19: rename renderer source files and implement latex renderer new functions
This commit is contained in:
parent
2d2ca67c48
commit
96f1347b2c
@ -38,7 +38,7 @@ G_BEGIN_DECLS
|
|||||||
|
|
||||||
G_DECLARE_FINAL_TYPE(LatexRenderer, latex_renderer, GDS_RENDER, LATEX_RENDERER, GdsOutputRenderer)
|
G_DECLARE_FINAL_TYPE(LatexRenderer, latex_renderer, GDS_RENDER, LATEX_RENDERER, GdsOutputRenderer)
|
||||||
|
|
||||||
#define GDS_RENDERER_TYPE_LATEX_RENDERER (latex_renderer_get_type())
|
#define GDS_RENDER_TYPE_LATEX_RENDERER (latex_renderer_get_type())
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Buffer for LaTeX Code line in KiB
|
* @brief Buffer for LaTeX Code line in KiB
|
||||||
@ -51,6 +51,22 @@ G_DECLARE_FINAL_TYPE(LatexRenderer, latex_renderer, GDS_RENDER, LATEX_RENDERER,
|
|||||||
*/
|
*/
|
||||||
LatexRenderer *latex_renderer_new();
|
LatexRenderer *latex_renderer_new();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Create new LatexRenderer object
|
||||||
|
*
|
||||||
|
* This function sets the 'pdf-layers' and 'standalone'
|
||||||
|
* properties for the newly created object.
|
||||||
|
*
|
||||||
|
* They can later be changes by modifying the properties again.
|
||||||
|
* On top of that, The options can be changed in the resulting
|
||||||
|
* LaTeX output file if needed.
|
||||||
|
*
|
||||||
|
* @param pdf_layers If PDF OCR layers should be enabled
|
||||||
|
* @param standalone If output TeX file should be standalone compilable
|
||||||
|
* @return New object
|
||||||
|
*/
|
||||||
|
LatexRenderer *latex_renderer_new_with_options(gboolean pdf_layers, gboolean standalone);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* _LATEX_OUTPUT_H_ */
|
#endif /* _LATEX_OUTPUT_H_ */
|
@ -32,7 +32,7 @@
|
|||||||
#include <cairo-pdf.h>
|
#include <cairo-pdf.h>
|
||||||
#include <cairo-svg.h>
|
#include <cairo-svg.h>
|
||||||
|
|
||||||
#include <gds-render/output-renderers/cairo-output.h>
|
#include <gds-render/output-renderers/cairo-renderer.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <gds-render/output-renderers/latex-output.h>
|
#include <gds-render/output-renderers/latex-renderer.h>
|
||||||
#include <gdk/gdk.h>
|
#include <gdk/gdk.h>
|
||||||
#include <gds-render/layer/layer-info.h>
|
#include <gds-render/layer/layer-info.h>
|
||||||
/**
|
/**
|
||||||
@ -410,4 +410,17 @@ static void latex_renderer_class_init(LatexRendererClass *klass)
|
|||||||
g_object_class_install_properties(oclass, N_PROPERTIES, latex_renderer_properties);
|
g_object_class_install_properties(oclass, N_PROPERTIES, latex_renderer_properties);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LatexRenderer *latex_renderer_new()
|
||||||
|
{
|
||||||
|
return GDS_RENDER_LATEX_RENDERER(g_object_new(GDS_RENDER_TYPE_LATEX_RENDERER, NULL));
|
||||||
|
}
|
||||||
|
|
||||||
|
LatexRenderer *latex_renderer_new_with_options(gboolean pdf_layers, gboolean standalone)
|
||||||
|
{
|
||||||
|
GObject *obj;
|
||||||
|
|
||||||
|
obj = g_object_new(GDS_RENDER_TYPE_LATEX_RENDERER, "standalone", standalone, "pdf-layers", pdf_layers, NULL);
|
||||||
|
return GDS_RENDER_LATEX_RENDERER(obj);
|
||||||
|
}
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
Loading…
Reference in New Issue
Block a user