Graphviz 12.0.1~dev.20240716.0800
Loading...
Searching...
No Matches
gvloadimage_pango.c File Reference
#include "config.h"
#include <stdbool.h>
#include <stdlib.h>
#include <gvc/gvplugin_loadimage.h>
#include <gvc/gvio.h>
#include <cairo.h>
Include dependency graph for gvloadimage_pango.c:

Go to the source code of this file.

Enumerations

enum  format_type { FORMAT_PNG_CAIRO , FORMAT_PNG_PS }
 

Functions

static cairo_status_t reader (void *closure, unsigned char *data, unsigned int length)
 
static void cairo_freeimage (usershape_t *us)
 
static cairo_surface_t * cairo_loadimage (GVJ_t *job, usershape_t *us)
 
static void pango_loadimage_cairo (GVJ_t *job, usershape_t *us, boxf b, bool filled)
 
static void pango_loadimage_ps (GVJ_t *job, usershape_t *us, boxf b, bool filled)
 

Variables

static gvloadimage_engine_t engine_cairo
 
static gvloadimage_engine_t engine_ps
 
gvplugin_installed_t gvloadimage_pango_types []
 

Enumeration Type Documentation

◆ format_type

Enumerator
FORMAT_PNG_CAIRO 
FORMAT_PNG_PS 

Definition at line 21 of file gvloadimage_pango.c.

Function Documentation

◆ cairo_freeimage()

static void cairo_freeimage ( usershape_t us)
static

Definition at line 35 of file gvloadimage_pango.c.

References usershape_s::data.

Referenced by cairo_loadimage().

Here is the caller graph for this function:

◆ cairo_loadimage()

static cairo_surface_t * cairo_loadimage ( GVJ_t job,
usershape_t us 
)
static

Definition at line 40 of file gvloadimage_pango.c.

References cairo_freeimage(), usershape_s::data, usershape_s::datafree, usershape_s::f, FT_PNG, gvusershape_file_access(), gvusershape_file_release(), usershape_s::name, NULL, reader(), and usershape_s::type.

Referenced by pango_loadimage_cairo(), and pango_loadimage_ps().

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

◆ pango_loadimage_cairo()

static void pango_loadimage_cairo ( GVJ_t job,
usershape_t us,
boxf  b,
bool  filled 
)
static

Definition at line 81 of file gvloadimage_pango.c.

References cairo_loadimage(), GVJ_s::context, usershape_s::h, boxf::LL, usershape_s::name, boxf::UR, usershape_s::w, pointf_s::x, and pointf_s::y.

Here is the call graph for this function:

◆ pango_loadimage_ps()

static void pango_loadimage_ps ( GVJ_t job,
usershape_t us,
boxf  b,
bool  filled 
)
static

Definition at line 105 of file gvloadimage_pango.c.

References alpha, cairo_loadimage(), GVJ_s::dpi, format, gvprintf(), gvputs(), boxf::LL, boxf::UR, pointf_s::x, X, pointf_s::y, and Y.

Here is the call graph for this function:

◆ reader()

static cairo_status_t reader ( void *  closure,
unsigned char *  data,
unsigned int  length 
)
static

Definition at line 26 of file gvloadimage_pango.c.

Referenced by cairo_loadimage().

Here is the caller graph for this function:

Variable Documentation

◆ engine_cairo

gvloadimage_engine_t engine_cairo
static
Initial value:
= {
}
static void pango_loadimage_cairo(GVJ_t *job, usershape_t *us, boxf b, bool filled)

Definition at line 170 of file gvloadimage_pango.c.

◆ engine_ps

gvloadimage_engine_t engine_ps
static
Initial value:
= {
}
static void pango_loadimage_ps(GVJ_t *job, usershape_t *us, boxf b, bool filled)

Definition at line 174 of file gvloadimage_pango.c.

◆ gvloadimage_pango_types

gvplugin_installed_t gvloadimage_pango_types[]
Initial value:
= {
{FORMAT_PNG_CAIRO, "png:cairo", 1, &engine_cairo, NULL},
{FORMAT_PNG_PS, "png:lasi", 2, &engine_ps, NULL},
{FORMAT_PNG_PS, "png:ps", 2, &engine_ps, NULL},
{0, NULL, 0, NULL, NULL}
}
node NULL
Definition grammar.y:149
static gvloadimage_engine_t engine_ps
static gvloadimage_engine_t engine_cairo
@ FORMAT_PNG_PS
@ FORMAT_PNG_CAIRO

Definition at line 178 of file gvloadimage_pango.c.