Graphviz 12.0.1~dev.20240716.0800
Loading...
Searching...
No Matches
gvrender_lasi.cpp File Reference
#include <cstddef>
#include <iostream>
#include <fstream>
#include <stdexcept>
#include <string>
#include <LASi.h>
#include "config.h"
#include <gvc/gvplugin_render.h>
#include <gvc/gvplugin_device.h>
#include <gvc/gvio.h>
#include <gvc/gvcint.h>
#include <cgraph/agxbuf.h>
#include <cgraph/prisize_t.h>
#include <cgraph/unreachable.h>
#include <common/const.h>
#include <common/utils.h>
#include "../core/ps.h"
Include dependency graph for gvrender_lasi.cpp:

Go to the source code of this file.

Data Structures

struct  Context
 

Macros

#define PDFMAX   14400
 Maximum size of PDF page.
 

Enumerations

enum  format_type { FORMAT_PS , FORMAT_PS2 , FORMAT_EPS }
 

Functions

static size_t lasi_head_writer (GVJ_t *job, const char *s, size_t len)
 
static size_t lasi_body_writer (GVJ_t *job, const char *s, size_t len)
 
static size_t lasi_footer_writer (GVJ_t *job, const char *s, size_t len)
 
static void lasi_begin_job (GVJ_t *job)
 
static void lasi_end_job (GVJ_t *job)
 
static void lasi_begin_graph (GVJ_t *job)
 
static void lasi_begin_layer (GVJ_t *job, char *, int layerNum, int numLayers)
 
static void lasi_begin_page (GVJ_t *job)
 
static void lasi_end_page (GVJ_t *job)
 
static void lasi_begin_cluster (GVJ_t *job)
 
static void lasi_end_cluster (GVJ_t *job)
 
static void lasi_begin_node (GVJ_t *job)
 
static void lasi_end_node (GVJ_t *job)
 
static void lasi_begin_edge (GVJ_t *job)
 
static void lasi_end_edge (GVJ_t *job)
 
static void lasi_begin_anchor (GVJ_t *job, char *url, char *, char *, char *)
 
static void ps_set_pen_style (GVJ_t *job)
 
static void ps_set_color (GVJ_t *job, gvcolor_t *color)
 
static void lasi_textspan (GVJ_t *job, pointf p, textspan_t *span)
 
static void lasi_ellipse (GVJ_t *job, pointf *A, int filled)
 
static void lasi_bezier (GVJ_t *job, pointf *A, size_t n, int filled)
 
static void lasi_polygon (GVJ_t *job, pointf *A, size_t n, int filled)
 
static void lasi_polyline (GVJ_t *job, pointf *A, size_t n)
 
static void lasi_comment (GVJ_t *job, char *str)
 
static void lasi_library_shape (GVJ_t *job, char *name, pointf *A, size_t n, int filled)
 

Variables

static gvrender_engine_t lasi_engine
 
static gvrender_features_t render_features_lasi
 
static gvdevice_features_t device_features_ps
 
static gvdevice_features_t device_features_eps
 
gvplugin_installed_t gvrender_lasi_types []
 
gvplugin_installed_t gvdevice_lasi_types []
 

Macro Definition Documentation

◆ PDFMAX

#define PDFMAX   14400

Definition at line 37 of file gvrender_lasi.cpp.

Enumeration Type Documentation

◆ format_type

Enumerator
FORMAT_PS 
FORMAT_PS2 
FORMAT_EPS 

Definition at line 39 of file gvrender_lasi.cpp.

Function Documentation

◆ lasi_begin_anchor()

static void lasi_begin_anchor ( GVJ_t job,
char *  url,
char *  ,
char *  ,
char *   
)
static

Definition at line 251 of file gvrender_lasi.cpp.

References CHAR_UTF8, gvprintf(), gvprintpointflist(), gvputs(), GVJ_s::obj, ps_string(), and obj_state_s::url_map_p.

Here is the call graph for this function:

◆ lasi_begin_cluster()

static void lasi_begin_cluster ( GVJ_t job)
static

Definition at line 217 of file gvrender_lasi.cpp.

References agnameof(), gvprintf(), gvputs(), GVJ_s::obj, obj_state_s::sg, and obj_state_s::u.

Here is the call graph for this function:

◆ lasi_begin_edge()

static void lasi_begin_edge ( GVJ_t job)
static

Definition at line 241 of file gvrender_lasi.cpp.

References gvputs().

Here is the call graph for this function:

◆ lasi_begin_graph()

static void lasi_begin_graph ( GVJ_t job)
static

◆ lasi_begin_job()

static void lasi_begin_job ( GVJ_t job)
static

Definition at line 71 of file gvrender_lasi.cpp.

References GVJ_s::common, GVJ_s::context, GVJ_s::gvc, gvprintf(), GVCOMMON_s::info, lasi_head_writer(), and GVC_s::write_fn.

Here is the call graph for this function:

◆ lasi_begin_layer()

static void lasi_begin_layer ( GVJ_t job,
char *  ,
int  layerNum,
int  numLayers 
)
static

Definition at line 164 of file gvrender_lasi.cpp.

References gvprintf().

Here is the call graph for this function:

◆ lasi_begin_node()

static void lasi_begin_node ( GVJ_t job)
static

Definition at line 230 of file gvrender_lasi.cpp.

References gvputs().

Here is the call graph for this function:

◆ lasi_begin_page()

static void lasi_begin_page ( GVJ_t job)
static

Definition at line 169 of file gvrender_lasi.cpp.

References GVJ_s::common, GVCOMMON_s::errorfn, FORMAT_PS2, gvprintf(), gvplugin_active_render_s::id, box::LL, GVJ_s::numPages, GVJ_s::pageBoundingBox, GVJ_s::pagesArrayElem, PDFMAX, GVJ_s::render, GVJ_s::rotation, GVJ_s::scale, GVCOMMON_s::show_boxes, GVJ_s::translation, box::UR, GVCOMMON_s::viewNum, point::x, pointf_s::x, point::y, and pointf_s::y.

Here is the call graph for this function:

◆ lasi_bezier()

static void lasi_bezier ( GVJ_t job,
pointf A,
size_t  n,
int  filled 
)
static

Definition at line 453 of file gvrender_lasi.cpp.

References A, obj_state_s::fillcolor, gvprintpointf(), gvprintpointflist(), gvputs(), color_s::HSVA, GVJ_s::obj, obj_state_s::pencolor, ps_set_color(), ps_set_pen_style(), and color_s::u.

Here is the call graph for this function:

◆ lasi_body_writer()

static size_t lasi_body_writer ( GVJ_t job,
const char *  s,
size_t  len 
)
static

Definition at line 57 of file gvrender_lasi.cpp.

References GVJ_s::context, Context::doc, and len().

Referenced by lasi_begin_graph().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lasi_comment()

static void lasi_comment ( GVJ_t job,
char *  str 
)
static

Definition at line 520 of file gvrender_lasi.cpp.

References gvputs(), and str.

Here is the call graph for this function:

◆ lasi_ellipse()

static void lasi_ellipse ( GVJ_t job,
pointf A,
int  filled 
)
static

Definition at line 431 of file gvrender_lasi.cpp.

References A, obj_state_s::fillcolor, gvprintpointflist(), gvputs(), color_s::HSVA, GVJ_s::obj, obj_state_s::pencolor, ps_set_color(), ps_set_pen_style(), color_s::u, pointf_s::x, and pointf_s::y.

Here is the call graph for this function:

◆ lasi_end_cluster()

static void lasi_end_cluster ( GVJ_t job)
static

Definition at line 225 of file gvrender_lasi.cpp.

References gvputs().

Here is the call graph for this function:

◆ lasi_end_edge()

static void lasi_end_edge ( GVJ_t job)
static

Definition at line 246 of file gvrender_lasi.cpp.

References gvputs().

Here is the call graph for this function:

◆ lasi_end_job()

static void lasi_end_job ( GVJ_t job)
static

Definition at line 80 of file gvrender_lasi.cpp.

References GVJ_s::boundingBox, GVJ_s::common, GVJ_s::context, Context::doc, FORMAT_EPS, GVJ_s::gvc, gvprintf(), gvputs(), gvplugin_active_render_s::id, lasi_footer_writer(), box::LL, GVJ_s::render, Context::save_write_fn, GVCOMMON_s::show_boxes, box::UR, GVCOMMON_s::viewNum, GVC_s::write_fn, point::x, and point::y.

Here is the call graph for this function:

◆ lasi_end_node()

static void lasi_end_node ( GVJ_t job)
static

Definition at line 235 of file gvrender_lasi.cpp.

References gvputs().

Here is the call graph for this function:

◆ lasi_end_page()

static void lasi_end_page ( GVJ_t job)
static

Definition at line 204 of file gvrender_lasi.cpp.

References cat_libfile(), GVJ_s::common, gvprintf(), gvputs(), GVCOMMON_s::show_boxes, and GVCOMMON_s::viewNum.

Here is the call graph for this function:

◆ lasi_footer_writer()

static size_t lasi_footer_writer ( GVJ_t job,
const char *  s,
size_t  len 
)
static

Definition at line 64 of file gvrender_lasi.cpp.

References GVJ_s::context, Context::doc, and len().

Referenced by lasi_end_job().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lasi_head_writer()

static size_t lasi_head_writer ( GVJ_t job,
const char *  s,
size_t  len 
)
static

Definition at line 50 of file gvrender_lasi.cpp.

References GVJ_s::context, Context::doc, and len().

Referenced by lasi_begin_job().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lasi_library_shape()

static void lasi_library_shape ( GVJ_t job,
char *  name,
pointf A,
size_t  n,
int  filled 
)
static

Definition at line 527 of file gvrender_lasi.cpp.

References A, obj_state_s::fillcolor, gvprintf(), gvprintpointf(), gvprintpointflist(), gvputs(), color_s::HSVA, GVJ_s::obj, obj_state_s::pencolor, PRISIZE_T, ps_set_color(), ps_set_pen_style(), and color_s::u.

Here is the call graph for this function:

◆ lasi_polygon()

static void lasi_polygon ( GVJ_t job,
pointf A,
size_t  n,
int  filled 
)
static

Definition at line 479 of file gvrender_lasi.cpp.

References A, obj_state_s::fillcolor, gvprintpointf(), gvputs(), color_s::HSVA, GVJ_s::obj, obj_state_s::pencolor, ps_set_color(), ps_set_pen_style(), and color_s::u.

Here is the call graph for this function:

◆ lasi_polyline()

static void lasi_polyline ( GVJ_t job,
pointf A,
size_t  n 
)
static

Definition at line 505 of file gvrender_lasi.cpp.

References A, gvprintpointf(), gvputs(), color_s::HSVA, GVJ_s::obj, obj_state_s::pencolor, ps_set_color(), ps_set_pen_style(), and color_s::u.

Here is the call graph for this function:

◆ lasi_textspan()

◆ ps_set_color()

static void ps_set_color ( GVJ_t job,
gvcolor_t color 
)
static

Definition at line 293 of file gvrender_lasi.cpp.

References CLUSTER_OBJTYPE, color(), EDGE_OBJTYPE, gvprintf(), NODE_OBJTYPE, GVJ_s::obj, ROOTGRAPH_OBJTYPE, and obj_state_s::type.

Referenced by lasi_bezier(), lasi_ellipse(), lasi_library_shape(), lasi_polygon(), lasi_polyline(), and lasi_textspan().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ps_set_pen_style()

static void ps_set_pen_style ( GVJ_t job)
static

Definition at line 267 of file gvrender_lasi.cpp.

References gvprintdouble(), gvprintf(), gvputs(), GVJ_s::obj, obj_state_s::penwidth, penwidth, and obj_state_s::rawstyle.

Referenced by lasi_bezier(), lasi_ellipse(), lasi_library_shape(), lasi_polygon(), and lasi_polyline().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ device_features_eps

gvdevice_features_t device_features_eps
static
Initial value:
= {
0,
{36.,36.},
{612.,792.},
{72.,72.},
}

Definition at line 600 of file gvrender_lasi.cpp.

◆ device_features_ps

gvdevice_features_t device_features_ps
static
Initial value:
= {
{36.,36.},
{612.,792.},
{72.,72.},
}
#define GVDEVICE_DOES_PAGES
Definition gvcjob.h:87
#define GVDEVICE_DOES_LAYERS
Definition gvcjob.h:88

Definition at line 592 of file gvrender_lasi.cpp.

◆ gvdevice_lasi_types

gvplugin_installed_t gvdevice_lasi_types[]
Initial value:
= {
{FORMAT_PS, "ps:lasi", -5, nullptr, &device_features_ps},
{FORMAT_PS2, "ps2:lasi", -5, nullptr, &device_features_ps},
{FORMAT_EPS, "eps:lasi", -5, nullptr, &device_features_eps},
{0, nullptr, 0, nullptr, nullptr}
}
static gvdevice_features_t device_features_eps
static gvdevice_features_t device_features_ps
@ FORMAT_EPS
@ FORMAT_PS2
@ FORMAT_PS

Definition at line 612 of file gvrender_lasi.cpp.

◆ gvrender_lasi_types

gvplugin_installed_t gvrender_lasi_types[]
Initial value:
= {
{0, nullptr, 0, nullptr, nullptr}
}
static gvrender_engine_t lasi_engine
static gvrender_features_t render_features_lasi

Definition at line 607 of file gvrender_lasi.cpp.

◆ lasi_engine

gvrender_engine_t lasi_engine
static

Definition at line 548 of file gvrender_lasi.cpp.

◆ render_features_lasi

gvrender_features_t render_features_lasi
static
Initial value:
= {
4.,
nullptr,
0,
}
@ HSVA_DOUBLE
Definition color.h:26
#define GVRENDER_NO_WHITE_BG
Definition gvcjob.h:106
#define GVRENDER_DOES_MAPS
Definition gvcjob.h:97
#define GVRENDER_DOES_TRANSFORM
Definition gvcjob.h:95
#define GVRENDER_DOES_MAP_RECTANGLE
Definition gvcjob.h:98

Definition at line 581 of file gvrender_lasi.cpp.