Compare commits

..

No commits in common. "a2bcda6752c87fbfb043f7d4ea7efeb3659b027f" and "94ac44ddc57a8d02d00cec842cc58bcb6ceb22f6" have entirely different histories.

10 changed files with 21 additions and 72 deletions

View File

@ -1,4 +1,4 @@
/**
* @defgroup Cairo-Renderer Cairo Renderer
* @ingroup GdsOutputRenderer
* @ingroup renderers
*/

View File

@ -1,15 +1,4 @@
/**
* @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.
*
* @defgroup external-renderer External Shared Object Renderer
* @ingroup renderers
*/

View File

@ -1,34 +0,0 @@
/**
* @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.
*
*/

View File

@ -1,16 +1,4 @@
/**
* @defgroup LaTeX-Renderer LaTeX/TikZ Renderer
* @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
*
* @ingroup renderers
*/

9
doxygen/renderers.dox Normal file
View File

@ -0,0 +1,9 @@
/**
* @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.
*/

View File

@ -293,7 +293,7 @@ static void async_rendering_finished_callback(GdsOutputRenderer *renderer, gpoin
g_object_unref(renderer);
}
static void async_rendering_status_update_callback(GdsOutputRenderer *renderer, const char *status_message, gpointer data)
static void async_rendering_status_update_callback(GdsOutputRenderer *renderer, char *status_message, gpointer data)
{
GdsRenderGui *gui;
(void)renderer;
@ -301,6 +301,7 @@ static void async_rendering_status_update_callback(GdsOutputRenderer *renderer,
gui = RENDERER_GUI(data);
activity_bar_set_busy(gui->activity_status_bar, status_message);
g_free(status_message);
}
/**

View File

@ -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 reffered to as vertex
* @brief A point in the 2D plane. Sometimes references as vertex
*/
struct gds_point {
int x;

View File

@ -50,7 +50,6 @@ 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
*/

View File

@ -20,6 +20,9 @@
/**
* @file gds-output-renderer.c
* @brief Base GObject class for output renderers
*
* All output renderers are derived from this class
*
* @author Mario Hüttel <mario.huettel@gmx.net>
*/
@ -402,7 +405,7 @@ static gboolean idle_event_processor_callback(gpointer user_data)
priv = gds_output_renderer_get_instance_private(renderer);
if (g_mutex_trylock(&priv->idle_function_parameters.message_lock)) {
status_message = priv->idle_function_parameters.status_message;
status_message = g_strdup(priv->idle_function_parameters.status_message);
g_signal_emit(renderer, gds_output_renderer_signals[ASYNC_PROGRESS_CHANGED], 0, status_message);
g_free(priv->idle_function_parameters.status_message);
priv->idle_function_parameters.status_message = NULL;

View File

@ -29,15 +29,10 @@
#include <gdk/gdk.h>
#include <gds-render/layer/layer-info.h>
/**
* @addtogroup LaTeX-Renderer
* @addtogroup LatexRenderer
* @{
*/
/**
* @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;
@ -231,7 +226,6 @@ 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)