diff --git a/include/gds-render/output-renderers/cairo-output.h b/include/gds-render/output-renderers/cairo-renderer.h similarity index 100% rename from include/gds-render/output-renderers/cairo-output.h rename to include/gds-render/output-renderers/cairo-renderer.h diff --git a/include/gds-render/output-renderers/latex-output.h b/include/gds-render/output-renderers/latex-renderer.h similarity index 69% rename from include/gds-render/output-renderers/latex-output.h rename to include/gds-render/output-renderers/latex-renderer.h index d680df0..4c58f16 100644 --- a/include/gds-render/output-renderers/latex-output.h +++ b/include/gds-render/output-renderers/latex-renderer.h @@ -38,7 +38,7 @@ G_BEGIN_DECLS 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 @@ -51,6 +51,22 @@ G_DECLARE_FINAL_TYPE(LatexRenderer, latex_renderer, GDS_RENDER, LATEX_RENDERER, */ 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 #endif /* _LATEX_OUTPUT_H_ */ diff --git a/output-renderers/cairo-output.c b/output-renderers/cairo-renderer.c similarity index 99% rename from output-renderers/cairo-output.c rename to output-renderers/cairo-renderer.c index 309a03e..a7de78b 100644 --- a/output-renderers/cairo-output.c +++ b/output-renderers/cairo-renderer.c @@ -32,7 +32,7 @@ #include #include -#include +#include #include #include diff --git a/output-renderers/latex-output.c b/output-renderers/latex-renderer.c similarity index 96% rename from output-renderers/latex-output.c rename to output-renderers/latex-renderer.c index 721b66f..d1ab4e2 100644 --- a/output-renderers/latex-output.c +++ b/output-renderers/latex-renderer.c @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include /** @@ -410,4 +410,17 @@ static void latex_renderer_class_init(LatexRendererClass *klass) 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); +} + /** @} */