diff --git a/doxygen/cairo-renderer.dox b/doxygen/cairo-renderer.dox index e6cafd8..bf7c9ac 100644 --- a/doxygen/cairo-renderer.dox +++ b/doxygen/cairo-renderer.dox @@ -1,4 +1,4 @@ /** * @defgroup Cairo-Renderer Cairo Renderer - * @ingroup renderers + * @ingroup GdsOutputRenderer */ diff --git a/doxygen/external-renderer.dox b/doxygen/external-renderer.dox index 4d03c51..e7bbad5 100644 --- a/doxygen/external-renderer.dox +++ b/doxygen/external-renderer.dox @@ -1,4 +1,15 @@ /** - * @defgroup external-renderer External Shared Object Renderer - * @ingroup renderers + * @defgroup ExternalRenderer External Shared Object Renderer + * @ingroup GdsOutputRenderer + * + * @subsection ExternalRendererProps Properties + * This class inherits all properties from its parent @ref GdsOutputRenderer. + * In addition to that, it implements the following properties: + * + * Property Name | Description + * -----------------|---------------------------------------------------------------- + * shared-object-path | Path to the shared object used for rendering + * + * All these properties have to be set for rendering. + * */ diff --git a/doxygen/gds-output-renderer.dox b/doxygen/gds-output-renderer.dox new file mode 100644 index 0000000..6d2e083 --- /dev/null +++ b/doxygen/gds-output-renderer.dox @@ -0,0 +1,34 @@ +/** + * @defgroup GdsOutputRenderer GDS Output Renderer base class + * + * The renderers are used to convert the cell structures read from the GDS layout file + * into different output formats. + * + * The GdsOutputRenderer base class is used to derive all renderers from. + * + * @warning Although the GdsOutputRenderer class provides compatibility for asynchronous rendering, + * the class is not thread safe / re-entrant. Only use it from a signle context. Not even the rendering function called is allowed to modifiy this object. + * + * A allowed function to be called from the async rendering thread is #gds_output_renderer_update_gui_status_from_async and the get functions for the properties. + * + * @note The context that owned the renderer has to ensure that only one rendering is active at a time for a single instance of a renderer. + * + * By default this class implements the following features: + * + * @subsection GdsOutputRendererProps Properties + * Property Name | Description + * -----------------|---------------------------------------------------------------- + * layer-settings | LayerSettings object containing the layer rendering information + * output-file | Output file name for rendering + * + * All these properties have to be set for rendering. + * + * @subsection GdsOutputRendererSignals Signals / Events + * Signal Name | Description | Callback prototype + * -----------------|-------------------------------------------------|----------------------------------------------------------- + * async-finished | The asynchronous rendering is finished | void callback(GdsOutputRenderer *src, gpointer user_data) + * progress-changed | The asynchronous rendering progress changed | void callback(GdsOutputRenderer *src, const char *progress, gpointer user_data) + * + * @note The `char *progress` supplied to the callback function must not be modified or freed. + * + */ diff --git a/doxygen/latex-renderer.dox b/doxygen/latex-renderer.dox index bafb197..ee73196 100644 --- a/doxygen/latex-renderer.dox +++ b/doxygen/latex-renderer.dox @@ -1,4 +1,16 @@ /** * @defgroup LaTeX-Renderer LaTeX/TikZ Renderer - * @ingroup renderers + * @ingroup GdsOutputRenderer + * + * This is the class implementing the Latex / tikz output rendering + + * @subsection LaTeXRendererProps Properties + * This class inherits all properties from its parent @ref GdsOutputRenderer. + * In addition to that, it implements the following properties: + * + * Property Name | Description + * -----------------|---------------------------------------------------------------- + * standalone | Configure output LaTeX document to be standalone compilable (requires standalone documentclass) + * pdf-layers | Create OCG layers in LaTeX output + * */ diff --git a/doxygen/renderers.dox b/doxygen/renderers.dox deleted file mode 100644 index 753c7ec..0000000 --- a/doxygen/renderers.dox +++ /dev/null @@ -1,9 +0,0 @@ -/** - * @defgroup renderers Output Renderers - * - * The renderers are used to convert the cell structures read from the GDS layout file - * into different output formats. - * - * Currently the renders are statically implemented without the use of GObjects. - * This will probably change in future releases in order to make it easier to integrate new rendering methods. - */ diff --git a/include/gds-render/gds-utils/gds-types.h b/include/gds-render/gds-utils/gds-types.h index c4fd1b1..4e1e49f 100644 --- a/include/gds-render/gds-utils/gds-types.h +++ b/include/gds-render/gds-utils/gds-types.h @@ -58,7 +58,7 @@ enum graphics_type enum path_type {PATH_FLUSH = 0, PATH_ROUNDED = 1, PATH_SQUARED = 2}; /**< Path line caps */ /** - * @brief A point in the 2D plane. Sometimes references as vertex + * @brief A point in the 2D plane. Sometimes reffered to as vertex */ struct gds_point { int x; diff --git a/output-renderers/external-renderer.c b/output-renderers/external-renderer.c index ba0dd0c..876433e 100644 --- a/output-renderers/external-renderer.c +++ b/output-renderers/external-renderer.c @@ -50,6 +50,7 @@ G_DEFINE_TYPE(ExternalRenderer, external_renderer, GDS_RENDER_TYPE_OUTPUT_RENDER * @param toplevel_cell Cell to render * @param layer_info_list Layer information (Color etc.) * @param output_file Destination file + * @param scale the scaling value to scale the output cell down by. * @param so_path Path to shared object * @return 0 if successful */ diff --git a/output-renderers/gds-output-renderer.c b/output-renderers/gds-output-renderer.c index e8f7fc1..12aedf6 100644 --- a/output-renderers/gds-output-renderer.c +++ b/output-renderers/gds-output-renderer.c @@ -20,9 +20,6 @@ /** * @file gds-output-renderer.c * @brief Base GObject class for output renderers - * - * All output renderers are derived from this class - * * @author Mario Hüttel */ diff --git a/output-renderers/latex-renderer.c b/output-renderers/latex-renderer.c index 730852c..e0b21d6 100644 --- a/output-renderers/latex-renderer.c +++ b/output-renderers/latex-renderer.c @@ -29,10 +29,15 @@ #include #include /** - * @addtogroup LatexRenderer + * @addtogroup LaTeX-Renderer * @{ */ +/** + * @brief Struct representing the LaTeX-Renderer object. + * + * This struct holds the LaTeX renderer internal data. It is only used inside the @ref LatexRenderer class. + */ struct _LatexRenderer { GdsOutputRenderer parent; gboolean tex_standalone; @@ -226,6 +231,7 @@ static void generate_graphics(FILE *tex_file, GList *graphics, GList *linfo, GSt * @param tex_file File to write to * @param buffer Working buffer * @param scale Scale output down by this value + * @param renderer The current renderer as GdsOutputRenderer. This is used to emit the status updates to the GUI */ static void render_cell(struct gds_cell *cell, GList *layer_infos, FILE *tex_file, GString *buffer, double scale, GdsOutputRenderer *renderer)