The lglPaper Structure

The lglPaper Structure — Paper size definitions

Functions

Types and Values

struct lglPaper

Includes

#include <libglabels/lgl-paper.h>

Description

This section describes a structure for representing a paper size definition and related functions.

Functions

lgl_paper_new ()

lglPaper *
lgl_paper_new (gchar *id,
               gchar *name,
               gdouble width,
               gdouble height,
               gchar *pwg_size);

Allocates and constructs a new lglPaper structure.

Parameters

id

Id of paper definition. (E.g. US-Letter, A4, etc.) Should be unique.

 

name

Localized name of paper.

 

width

Width of paper in points.

 

height

Height of paper in points.

 

pwg_size

PWG 5101.1-2002 size name.

 

Returns

a pointer to a newly allocated lglPaper structure.


lgl_paper_dup ()

lglPaper *
lgl_paper_dup (const lglPaper *orig);

Duplicates an existing lglPaper structure.

Parameters

orig

lglPaper structure to be duplicated.

 

Returns

a pointer to a newly allocated lglPaper structure.


lgl_paper_free ()

void
lgl_paper_free (lglPaper *paper);

Free all memory associated with an existing lglPaper structure.

Parameters

paper

pointer to lglPaper structure to be freed.

 

Types and Values

struct lglPaper

struct lglPaper {
        gchar               *id;       /* Unique ID of paper definition */
        gchar               *name;     /* Localized name of paper */
        gdouble              width;    /* Width (in points) */
        gdouble              height;   /* Height (in points) */
        gchar               *pwg_size; /* PWG 5101.1-2002 size name */
};

This structure defines a paper (page) size.

Members

gchar *id;

Paper size ID.

 

gchar *name;

Localized paper size name.

 

gdouble width;

Width of paper in points.

 

gdouble height;

Height of paper in points.

 

gchar *pwg_size;

Paper size string as defined in PWG 5101.1-2002.