Cairo Renderer

Cairo Renderer — Render barcode to cairo context

Synopsis

#include <libglbarcode/lgl-barcode-render-to-cairo.h>

void                lgl_barcode_render_to_cairo         (const lglBarcode *bc,
                                                         cairo_t *cr);
void                lgl_barcode_render_to_cairo_path    (const lglBarcode *bc,
                                                         cairo_t *cr);

Description

This section describes the cairo barcode renderer.

Details

lgl_barcode_render_to_cairo ()

void                lgl_barcode_render_to_cairo         (const lglBarcode *bc,
                                                         cairo_t *cr);

Render barcode to cairo context. Context should be prepared with desired translation and appropriate scale. Context should be translated such that the origin is at the desired location of the upper left hand corner of the barcode bounding box. Context should be scaled such that all dimensions are in points ( 1 point = 1/72 inch ) and that positive y coordinates go down the surface.

bc :

An lglBarcode structure

cr :

A cairo_t context

lgl_barcode_render_to_cairo_path ()

void                lgl_barcode_render_to_cairo_path    (const lglBarcode *bc,
                                                         cairo_t *cr);

Render barcode to cairo context, but only create a path to be filled or tested against. Context should be prepared with desired translation and appropriate scale. Context should be translated such that the origin is at the desired location of the upper left hand corner of the barcode bounding box. Context should be scaled such that all dimensions are in points ( 1 point = 1/72 inch ) and that positive y coordinates go down the surface.

bc :

An lglBarcode structure

cr :

A cairo_t context