|
LatexRenderer * | latex_renderer_new () |
| Create new LatexRenderer object. More...
|
|
LatexRenderer * | latex_renderer_new_with_options (gboolean pdf_layers, gboolean standalone) |
| Create new LatexRenderer object. More...
|
|
static void | write_layer_definitions (FILE *tex_file, GList *layer_infos, GString *buffer) |
| Write the layer declarration to TeX file. More...
|
|
static gboolean | write_layer_env (FILE *tex_file, GdkRGBA *color, int layer, GList *linfo, GString *buffer) |
| Write layer Envirmonment. More...
|
|
static void | generate_graphics (FILE *tex_file, GList *graphics, GList *linfo, GString *buffer, double scale) |
| Writes a graphics object to the specified tex_file. More...
|
|
static void | render_cell (struct gds_cell *cell, GList *layer_infos, FILE *tex_file, GString *buffer, double scale, GdsOutputRenderer *renderer) |
| Render cell to file. More...
|
|
static int | latex_render_cell_to_code (struct gds_cell *cell, GList *layer_infos, FILE *tex_file, double scale, gboolean create_pdf_layers, gboolean standalone_document, GdsOutputRenderer *renderer) |
|
static int | latex_renderer_render_output (GdsOutputRenderer *renderer, struct gds_cell *cell, double scale) |
|
static void | latex_renderer_init (LatexRenderer *self) |
|
static void | latex_renderer_get_property (GObject *obj, guint property_id, GValue *value, GParamSpec *pspec) |
|
static void | latex_renderer_set_property (GObject *obj, guint property_id, const GValue *value, GParamSpec *pspec) |
|
static void | latex_renderer_class_init (LatexRendererClass *klass) |
|
This is the class implementing the \(\mbox{\LaTeX}\) / TikZ output rendering
Properties
This class inherits all properties from its parent GDS Output Renderer base class. 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 |
◆ GDS_RENDER_TYPE_LATEX_RENDERER
#define GDS_RENDER_TYPE_LATEX_RENDERER (latex_renderer_get_type()) |
◆ LATEX_LINE_BUFFER_KB
#define LATEX_LINE_BUFFER_KB (10) |
◆ WRITEOUT_BUFFER
#define WRITEOUT_BUFFER |
( |
|
buff | ) |
fwrite((buff)->str, sizeof(char), (buff)->len, tex_file) |
Writes a GString buffer
to the fixed file tex_file.
- Note
- This is a convinience macro. Do not use this anywhere else. It might change behavior in futurtre releases
Definition at line 60 of file latex-renderer.c.
◆ anonymous enum
Enumerator |
---|
PROP_STANDALONE | |
PROP_PDF_LAYERS | |
N_PROPERTIES | |
Definition at line 50 of file latex-renderer.c.
◆ generate_graphics()
static void generate_graphics |
( |
FILE * |
tex_file, |
|
|
GList * |
graphics, |
|
|
GList * |
linfo, |
|
|
GString * |
buffer, |
|
|
double |
scale |
|
) |
| |
|
static |
Writes a graphics object to the specified tex_file.
This function opens the layer, writes a graphics object and closes the layer
- Parameters
-
tex_file | File to write to |
graphics | Object to render |
linfo | Layer information |
buffer | Working buffer |
scale | Scale abject down by this value |
Definition at line 166 of file latex-renderer.c.
◆ latex_render_cell_to_code()
static int latex_render_cell_to_code |
( |
struct gds_cell * |
cell, |
|
|
GList * |
layer_infos, |
|
|
FILE * |
tex_file, |
|
|
double |
scale, |
|
|
gboolean |
create_pdf_layers, |
|
|
gboolean |
standalone_document, |
|
|
GdsOutputRenderer * |
renderer |
|
) |
| |
|
static |
◆ latex_renderer_class_init()
static void latex_renderer_class_init |
( |
LatexRendererClass * |
klass | ) |
|
|
static |
◆ latex_renderer_get_property()
static void latex_renderer_get_property |
( |
GObject * |
obj, |
|
|
guint |
property_id, |
|
|
GValue * |
value, |
|
|
GParamSpec * |
pspec |
|
) |
| |
|
static |
◆ latex_renderer_init()
static void latex_renderer_init |
( |
LatexRenderer * |
self | ) |
|
|
static |
◆ latex_renderer_new()
LatexRenderer * latex_renderer_new |
( |
| ) |
|
Create new LatexRenderer object.
- Returns
- New object
Definition at line 452 of file latex-renderer.c.
◆ latex_renderer_new_with_options()
LatexRenderer * latex_renderer_new_with_options |
( |
gboolean |
pdf_layers, |
|
|
gboolean |
standalone |
|
) |
| |
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.
- Parameters
-
pdf_layers | If PDF OCR layers should be enabled |
standalone | If output TeX file should be standalone compilable |
- Returns
- New object
Definition at line 457 of file latex-renderer.c.
◆ latex_renderer_render_output()
static int latex_renderer_render_output |
( |
GdsOutputRenderer * |
renderer, |
|
|
struct gds_cell * |
cell, |
|
|
double |
scale |
|
) |
| |
|
static |
◆ latex_renderer_set_property()
static void latex_renderer_set_property |
( |
GObject * |
obj, |
|
|
guint |
property_id, |
|
|
const GValue * |
value, |
|
|
GParamSpec * |
pspec |
|
) |
| |
|
static |
◆ render_cell()
static void render_cell |
( |
struct gds_cell * |
cell, |
|
|
GList * |
layer_infos, |
|
|
FILE * |
tex_file, |
|
|
GString * |
buffer, |
|
|
double |
scale, |
|
|
GdsOutputRenderer * |
renderer |
|
) |
| |
|
static |
Render cell to file.
- Parameters
-
cell | Cell to render |
layer_infos | Layer information |
tex_file | File to write to |
buffer | Working buffer |
scale | Scale output down by this value |
renderer | The current renderer as GdsOutputRenderer. This is used to emit the status updates to the GUI |
Definition at line 245 of file latex-renderer.c.
◆ write_layer_definitions()
static void write_layer_definitions |
( |
FILE * |
tex_file, |
|
|
GList * |
layer_infos, |
|
|
GString * |
buffer |
|
) |
| |
|
static |
Write the layer declarration to TeX file.
This writes the declaration of the layers and the mapping in which order the layers shall be rendered by TikZ. Layers are written in the order they are positioned inside the layer_infos
list.
- Parameters
-
tex_file | TeX-File to write to |
layer_infos | List containing layer_info structs. |
buffer | |
- Note
- The field layer_info::stacked_position is ignored. Stack depends on list order.
Definition at line 74 of file latex-renderer.c.
◆ write_layer_env()
static gboolean write_layer_env |
( |
FILE * |
tex_file, |
|
|
GdkRGBA * |
color, |
|
|
int |
layer, |
|
|
GList * |
linfo, |
|
|
GString * |
buffer |
|
) |
| |
|
static |
Write layer Envirmonment.
If the requested layer shall be rendered, this code writes the necessary code to open the layer. It also returns the color the layer shall be rendered in.
The followingenvironments are generated:
\begin{pgfonlayer}{<layer>}
% If pdf layers shall be used also this is enabled:
\begin{scope}[ocg={ref=<layer>, status=visible,name={<Layer Name>}}]
If the layer shall not be rendered, FALSE is returned and the color is not filled in and the cod eis not written to the file.
- Parameters
-
tex_file | TeX file to write to |
color | Return of the layer's color |
layer | Requested layer number |
linfo | Layer information list containing layer_info structs |
buffer | Some working buffer |
- Returns
- TRUE, if the layer shall be rendered.
- Note
- The opened environments have to be closed afterwards
Definition at line 133 of file latex-renderer.c.
◆ latex_renderer_properties
GParamSpec* latex_renderer_properties[N_PROPERTIES] = {NULL} |
|
static |