Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
rsvg-convert.c File Reference

Invoke the rSVG library to render SVG vector graphics with the help of Cairo. More...

Go to the source code of this file.

Description

Invoke the rSVG library to render SVG vector graphics with the help of Cairo.

Note
This tool is tightly integrated into the Lumiera build process in order to render icons and UI decorations designed as vector graphics, for those cases where it is beneficial to use bitmap graphics within the UI toolkit.

Definition in file rsvg-convert.c.

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <locale.h>
#include <librsvg/rsvg.h>
#include <librsvg/rsvg-cairo.h>

Macros

#define N_(X)   X
 
#define _(X)   X
 

Classes

struct  RsvgSizeCallbackData
 
struct  RsvgSourceRectangle
 

Functions

static void display_error (GError *err)
 
static void rsvg_cairo_size_callback (int *width, int *height, gpointer data)
 
static cairo_status_t rsvg_cairo_write_func (void *closure, const unsigned char *data, unsigned int length)
 
int main (int argc, char **argv)
 

Macro Definition Documentation

◆ N_

#define N_ (   X)    X

Definition at line 27 of file rsvg-convert.c.

◆ _

#define _ (   X)    X

Definition at line 52 of file rsvg-convert.c.


Class Documentation

◆ RsvgSizeCallbackData

struct RsvgSizeCallbackData
Class Members
gint width
gint height
+ Collaboration diagram for RsvgSizeCallbackData:

◆ RsvgSourceRectangle

struct RsvgSourceRectangle
Class Members
double left
double top
double width
double height
+ Collaboration diagram for RsvgSourceRectangle:

Function Documentation

◆ display_error()

static void display_error ( GError *  err)
static

Definition at line 72 of file rsvg-convert.c.

Referenced by main().

+ Here is the caller graph for this function:

◆ rsvg_cairo_size_callback()

static void rsvg_cairo_size_callback ( int *  width,
int *  height,
gpointer  data 
)
static

Definition at line 83 of file rsvg-convert.c.

Referenced by main().

+ Here is the caller graph for this function:

◆ rsvg_cairo_write_func()

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

Definition at line 92 of file rsvg-convert.c.

Referenced by main().

+ Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 101 of file rsvg-convert.c.

References _, display_error(), RsvgSourceRectangle::height, RsvgSourceRectangle::left, N_, NULL, rsvg_cairo_size_callback(), rsvg_cairo_write_func(), RsvgSourceRectangle::top, and RsvgSourceRectangle::width.

+ Here is the call graph for this function: