X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=docs%2Flibglabels%2Fhtml%2Flibglabels-3.0-template.html;fp=docs%2Flibglabels%2Fhtml%2Flibglabels-3.0-template.html;h=5520b929fe38e440ef35d3d6d57a2bf1c2b4fca2;hb=cbc5b369069a355c3fa9715c059271d45dbb33e0;hp=0000000000000000000000000000000000000000;hpb=b13649a65b7dfa46ba1ed7fe9e8afa4aaef70f79;p=glabels diff --git a/docs/libglabels/html/libglabels-3.0-template.html b/docs/libglabels/html/libglabels-3.0-template.html new file mode 100644 index 00000000..5520b929 --- /dev/null +++ b/docs/libglabels/html/libglabels-3.0-template.html @@ -0,0 +1,1891 @@ + + +
+ ++ | + | + | LibGlabels 3.0 Reference Manual | ++ |
---|---|---|---|---|
+Top + Â |Â + Description + |
+The lglTemplate Structure+The lglTemplate Structure â How templates are represented in memory + |
++ |
+#include <libglabels/lgl-template.h> + +struct lglTemplate; + +enum lglTemplateFrameShape; +union lglTemplateFrame; +struct lglTemplateFrameAll; +struct lglTemplateFrameRect; +struct lglTemplateFrameEllipse; +struct lglTemplateFrameRound; +struct lglTemplateFrameCD; + +struct lglTemplateLayout; + +enum lglTemplateMarkupType; +union lglTemplateMarkup; +struct lglTemplateMarkupMargin; +struct lglTemplateMarkupLine; +struct lglTemplateMarkupCircle; +struct lglTemplateMarkupRect; +struct lglTemplateMarkupEllipse; + +struct lglTemplateOrigin; + +lglTemplate * lgl_template_new (+const gchar *brand
, +const gchar *part
, +const gchar *description
, +const gchar *paper_id
, +gdouble page_width
, +gdouble page_height
); +lglTemplate * lgl_template_new_from_equiv (const gchar *brand
, +const gchar *part
, +const gchar *equiv_part
); +lglTemplate * lgl_template_dup (const lglTemplate *orig_template
); +void lgl_template_free (lglTemplate *template
); +void lgl_template_add_category (lglTemplate *template
, +const gchar *category_id
); +void lgl_template_add_frame (lglTemplate *template
, +lglTemplateFrame *frame
); + +gchar * lgl_template_get_name (const lglTemplate *template
); +gboolean lgl_template_do_templates_match (const lglTemplate *template1
, +const lglTemplate *template2
); +gboolean lgl_template_does_brand_match (const lglTemplate *template
, +const gchar *brand
); +gboolean lgl_template_does_page_size_match (const lglTemplate *template
, +const gchar *paper_id
); +gboolean lgl_template_does_category_match (const lglTemplate *template
, +const gchar *category_id
); +gboolean lgl_template_are_templates_identical + (const lglTemplate *template1
, +const lglTemplate *template2
); + +lglTemplateFrame * lgl_template_frame_rect_new (const gchar *id
, +gdouble w
, +gdouble h
, +gdouble r
, +gdouble x_waste
, +gdouble y_waste
); +lglTemplateFrame * lgl_template_frame_ellipse_new (const gchar *id
, +gdouble w
, +gdouble h
, +gdouble waste
); +lglTemplateFrame * lgl_template_frame_round_new (const gchar *id
, +gdouble r
, +gdouble waste
); +lglTemplateFrame * lgl_template_frame_cd_new (const gchar *id
, +gdouble r1
, +gdouble r2
, +gdouble w
, +gdouble h
, +gdouble waste
); +lglTemplateFrame * lgl_template_frame_dup (const lglTemplateFrame *orig_frame
); +void lgl_template_frame_free (lglTemplateFrame *frame
); +void lgl_template_frame_add_layout (lglTemplateFrame *frame
, +lglTemplateLayout *layout
); +void lgl_template_frame_add_markup (lglTemplateFrame *frame
, +lglTemplateMarkup *markup
); + +void lgl_template_frame_get_size (const lglTemplateFrame *frame
, +gdouble *w
, +gdouble *h
); +gint lgl_template_frame_get_n_labels (const lglTemplateFrame *frame
); +lglTemplateOrigin * lgl_template_frame_get_origins (const lglTemplateFrame *frame
); +gchar * lgl_template_frame_get_layout_description + (const lglTemplateFrame *frame
); +gchar * lgl_template_frame_get_size_description + (const lglTemplateFrame *frame
, +lglUnits units
); + +lglTemplateLayout * lgl_template_layout_new (gint nx
, +gint ny
, +gdouble x0
, +gdouble y0
, +gdouble dx
, +gdouble dy
); +lglTemplateLayout * lgl_template_layout_dup (const lglTemplateLayout *orig_layout
); +void lgl_template_layout_free (lglTemplateLayout *layout
); + +lglTemplateMarkup * lgl_template_markup_margin_new (gdouble size
); +lglTemplateMarkup * lgl_template_markup_line_new (gdouble x1
, +gdouble y1
, +gdouble x2
, +gdouble y2
); +lglTemplateMarkup * lgl_template_markup_circle_new (gdouble x0
, +gdouble y0
, +gdouble r
); +lglTemplateMarkup * lgl_template_markup_rect_new (gdouble x1
, +gdouble y1
, +gdouble w
, +gdouble h
, +gdouble r
); +lglTemplateMarkup * lgl_template_markup_ellipse_new (gdouble x1
, +gdouble y1
, +gdouble w
, +gdouble h
); +lglTemplateMarkup * lgl_template_markup_dup (const lglTemplateMarkup *orig_markup
); +void lgl_template_markup_free (lglTemplateMarkup *markup
); + +void lgl_template_print (const lglTemplate *template
); +
+This section describes a set of structures that represent a template in memory. It also +describes functions to help create and interpret these structures. +
+struct lglTemplate { + gchar *brand; + gchar *part; + gchar *equiv_part; + + gchar *description; + gchar *paper_id; + gdouble page_width; + gdouble page_height; + + /* Meta information. */ + gchar *product_url; /* URL to manufacturer's product website. */ + GList *category_ids; /* List of (gchar *) category ids. */ + + /* List of (lglTemplateFrame *) label frame structures. + * Currently glabels only supports a single label frame per + * template. */ + GList *frames; +}; ++
+This is the main structure of a libglabels template. A template represents a single sheet +of peel-off labels or cards. +
+gchar * |
+Vendor or brand name of label or card. E.g. "Avery." | +
gchar * |
+Part name or number of label or card. E.g. "8160." | +
gchar * |
+Part name or number of a part with identical layout. Must be from same vendor. | +
gchar * |
+A description of the template. E.g. "Mailing labels." | +
gchar * |
+A paper ID. E.g. "A4" or "US-Letter." | +
gdouble |
+Page width in points. Used only if paper_id is "Other." | +
gdouble |
+Page height in points. Used only if paper_id is "Other." | +
gchar * |
+URL to a webpage describing product. | +
GList * |
+A list of category IDs that this template belongs to. | +
GList * |
+A list of (lglTemplateFrame *) structures. GLabels currently only supports one frame +per template -- future versions may support multiple frames per template. | +
typedef enum { + LGL_TEMPLATE_FRAME_SHAPE_RECT, + LGL_TEMPLATE_FRAME_SHAPE_ELLIPSE, + LGL_TEMPLATE_FRAME_SHAPE_ROUND, + LGL_TEMPLATE_FRAME_SHAPE_CD +} lglTemplateFrameShape; ++
+This enumeration defines frame types that are supported by libglabels +
+ +union _lglTemplateFrame{ + + lglTemplateFrameShape shape; + + lglTemplateFrameAll all; + lglTemplateFrameRect rect; + lglTemplateFrameEllipse ellipse; + lglTemplateFrameRound round; + lglTemplateFrameCD cd; +}; ++
+A union of all possible frame structures. The type of structure is indicated by the shape +member, which overlays the first field of all other member structures. +
+struct lglTemplateFrameAll { + /* Begin Common Fields */ + lglTemplateFrameShape shape; + + gchar *id; /* Id, currently always "0" */ + GList *layouts; /* List of lglTemplateLayouts */ + GList *markups; /* List of lglTemplateMarkups */ + /* End Common Fields */ +}; ++
+This structure is composed of a set of fields common to all frame structures. All frame types +can be cast to this structure. +
+lglTemplateFrameShape |
+The shape of the frame. | +
gchar * |
+Reserved for future use. Should always be zero. | +
GList * |
+A list of (lglTemplateLayout *) structures. Typically a frame will have a single +layout, representing a simple grid of labels or cards. If the layout of labels or cards is +more complex, multiple (lglTemplateLayout *) structures may be needed. | +
GList * |
+A list of (lglTemplateMarkup *) structures, which represent non-printing markup lines. | +
struct lglTemplateFrameRect { + /* Begin Common Fields */ + lglTemplateFrameShape shape; /* Always LGL_TEMPLATE_FRAME_SHAPE_RECT. */ + + gchar *id; /* Id, currently always "0" */ + GList *layouts; /* List of lglTemplateLayouts */ + GList *markups; /* List of lglTemplateMarkups */ + /* End Common Fields */ + + gdouble w; /* Width */ + gdouble h; /* Height */ + gdouble r; /* Corner radius */ + gdouble x_waste; /* Amount of horiz overprint allowed. */ + gdouble y_waste; /* Amount of vert overprint allowed. */ +}; ++
+This structure defines the frame for a rectangular label or card. +
+lglTemplateFrameShape |
+Common field. Always LGL_TEMPLATE_FRAME_SHAPE_RECT for lglTemplateFrameRect. | +
gchar * |
+Common field. See lglTemplateFrameAll. | +
GList * |
+Common field. See lglTemplateFrameAll. | +
GList * |
+Common field. See lglTemplateFrameAll. | +
gdouble |
+Width of label or card in points. | +
gdouble |
+Height of label or card in points. | +
gdouble |
+Radius of corners in points. | +
gdouble |
+Amount of horizontal over-print to allow in points. | +
gdouble |
+Amount of vertical over-print to allow in points. | +
struct lglTemplateFrameEllipse { + /* Begin Common Fields */ + lglTemplateFrameShape shape; /* Always LGL_TEMPLATE_FRAME_SHAPE_ELLIPSE. */ + + gchar *id; /* Id, currently always "0" */ + GList *layouts; /* List of lglTemplateLayouts */ + GList *markups; /* List of lglTemplateMarkups */ + /* End Common Fields */ + + gdouble w; /* Width */ + gdouble h; /* Height */ + gdouble waste; /* Amount of overprint allowed. */ +}; ++
+This structure defines the frame for an elliptical label or card. +
+lglTemplateFrameShape |
+Common field. Always LGL_TEMPLATE_FRAME_SHAPE_ELLIPSE for lglTemplateFrameEllipse. | +
gchar * |
+Common field. See lglTemplateFrameAll. | +
GList * |
+Common field. See lglTemplateFrameAll. | +
GList * |
+Common field. See lglTemplateFrameAll. | +
gdouble |
+Width of label or card in points. | +
gdouble |
+Height of label or card in points. | +
gdouble |
+Amount of over-print to allow in points. | +
struct lglTemplateFrameRound { + /* Begin Common Fields */ + lglTemplateFrameShape shape; /* Always LGL_TEMPLATE_FRAME_SHAPE_ROUND. */ + + gchar *id; /* Id, currently always "0" */ + GList *layouts; /* List of lglTemplateLayouts */ + GList *markups; /* List of lglTemplateMarkups */ + /* End Common Fields */ + + gdouble r; /* Radius */ + gdouble waste; /* Amount of overprint allowed. */ +}; ++
+This structure defines the frame for a round label or card. +
+lglTemplateFrameShape |
+Common field. Always LGL_TEMPLATE_FRAME_SHAPE_ROUND for lglTemplateFrameRound. | +
gchar * |
+Common field. See lglTemplateFrameAll. | +
GList * |
+Common field. See lglTemplateFrameAll. | +
GList * |
+Common field. See lglTemplateFrameAll. | +
gdouble |
+Radius of label or card in points. | +
gdouble |
+Amount of over-print to allow in points. | +
struct lglTemplateFrameCD { + /* Begin Common Fields */ + lglTemplateFrameShape shape; /* Always LGL_TEMPLATE_FRAME_SHAPE_CD. */ + + gchar *id; /* Id, currently always "0" */ + GList *layouts; /* List of lglTemplateLayouts */ + GList *markups; /* List of lglTemplateMarkups */ + /* End Common Fields */ + + gdouble r1; /* Outer radius */ + gdouble r2; /* Inner radius (hole) */ + gdouble w; /* Clip width, business card CDs */ + gdouble h; /* Clip height, business card CDs */ + gdouble waste; /* Amount of overprint allowed. */ +}; ++
+This structure defines the frame for a CD or DVD label. This structure also supports +credit-card CD labels. +
+lglTemplateFrameShape |
+Common field. Always LGL_TEMPLATE_FRAME_SHAPE_CD for lglTemplateFrameCD. | +
gchar * |
+Common field. See lglTemplateFrameAll. | +
GList * |
+Common field. See lglTemplateFrameAll. | +
GList * |
+Common field. See lglTemplateFrameAll. | +
gdouble |
+Outer radius of label in points. | +
gdouble |
+Radius of center hole in points. | +
gdouble |
+Clip width in points. Used for credit-card CD labels. This field is ignored if zero. | +
gdouble |
+Clip height in points. Used for credit-card CD labels. This field is ignored if zero. | +
gdouble |
+Amount of over-print to allow in points. | +
struct lglTemplateLayout { + gint nx; /* Number of labels across */ + gint ny; /* Number of labels up and down */ + + gdouble x0; /* Left of grid from left edge of paper */ + gdouble y0; /* Top of grid from top edge of paper */ + + gdouble dx; /* Horizontal pitch of grid */ + gdouble dy; /* Vertical pitch of grid */ +}; ++
+This structure defines a simple grid layout of labels or cards. +
+gint |
+Number of labels or cards across in the grid (horizontal). | +
gint |
+Number of labels or cards down in the grid (vertical). | +
gdouble |
+Distance (in points) from the left edge of page to the left edge of the left column of +cards or labels in the layout. | +
gdouble |
+Distance (in points) from the top edge of page to the top edge of the top row of +cards or labels in the layout. | +
gdouble |
+Horizontal pitch of grid in points. This is the distance from left edge to left edge +(not the gap between labels or cards). | +
gdouble |
+Vertical pitch of grid in points. This is the distance from top edge to top edge +(not the gap between labels or cards). | +
typedef enum { + LGL_TEMPLATE_MARKUP_MARGIN, + LGL_TEMPLATE_MARKUP_LINE, + LGL_TEMPLATE_MARKUP_CIRCLE, + LGL_TEMPLATE_MARKUP_RECT, + LGL_TEMPLATE_MARKUP_ELLIPSE +} lglTemplateMarkupType; ++
+This enumeration defines markup types that are supported by libglabels +
++ | A margin line around perimeter of label or card. + | +
+ | A simple line segment. + | +
+ | A circle. + | +
+ | A rectangle. Possibly with rounded corners. + | +
+ | An ellipse. + | +
union _lglTemplateMarkup { + + lglTemplateMarkupType type; + + lglTemplateMarkupMargin margin; + lglTemplateMarkupLine line; + lglTemplateMarkupCircle circle; + lglTemplateMarkupRect rect; + lglTemplateMarkupEllipse ellipse; +}; ++
+A union of all possible markup structures. The type of structure is indicated by the type +member, which overlays the first field of all other member structures. +
+struct lglTemplateMarkupMargin { + lglTemplateMarkupType type; /* Always LGL_TEMPLATE_MARKUP_MARGIN */ + + gdouble size; /* Margin size */ +}; ++
+This structure defines a simple margin markup around the perimeter of a label or card. +
+lglTemplateMarkupType |
+Common field. Always LGL_TEMPLATE_MARKUP_MARGIN for lglTemplateMarkupMargin. | +
gdouble |
+Distance of margin from edge of label or card. | +
struct lglTemplateMarkupLine { + lglTemplateMarkupType type; /* Always LGL_TEMPLATE_MARKUP_LINE */ + + gdouble x1, y1; /* 1st endpoint */ + gdouble x2, y2; /* 2nd endpoint */ +}; ++
+This structure defines a simple line segment markup. +
+lglTemplateMarkupType |
+Common field. Always LGL_TEMPLATE_MARKUP_LINE for lglTemplateMarkupLine. | +
gdouble |
+Distance (in points) of first endpoint from left edge of label or card. | +
gdouble |
+Distance (in points) of first endpoint from top edge of label or card. | +
gdouble |
+Distance (in points) of second endpoint from left edge of label or card. | +
gdouble |
+Distance (in points) of second endpoint from top edge of label or card. | +
struct lglTemplateMarkupCircle { + lglTemplateMarkupType type; /* Always LGL_TEMPLATE_MARKUP_CIRCLE */ + + gdouble x0, y0; /* Center of circle */ + gdouble r; /* Radius of circle */ +}; ++
+This structure defines a simple circle markup. +
+lglTemplateMarkupType |
+Common field. Always LGL_TEMPLATE_MARKUP_CIRCLE for lglTemplateMarkupCircle. | +
gdouble |
+Distance (in points) of vertex from left edge of label or card. | +
gdouble |
+Distance (in points) of vertex from top edge of label or card. | +
gdouble |
+Radius of circle in points. | +
struct lglTemplateMarkupRect { + lglTemplateMarkupType type; /* Always LGL_TEMPLATE_MARKUP_RECT */ + + gdouble x1, y1; /* Upper left corner */ + gdouble w, h; /* Width and height. */ + gdouble r; /* Radius of corners. */ +}; ++
+This structure defines a simple rectangle markup. The rectangle can have rounded corners. +
+lglTemplateMarkupType |
+Common field. Always LGL_TEMPLATE_MARKUP_RECT for lglTemplateMarkupRect. | +
gdouble |
+Distance (in points) of left edge of markup from left edge of label or card. | +
gdouble |
+Distance (in points) of top edge of markup from top edge of label or card. | +
gdouble |
+Width of rectangle in points. | +
gdouble |
+Height of rectangle in points. | +
gdouble |
+Radius of corners in points. Should be zero for sharp corners. | +
struct lglTemplateMarkupEllipse { + lglTemplateMarkupType type; /* Always LGL_TEMPLATE_MARKUP_ELLIPSE */ + + gdouble x1, y1; /* Upper left corner */ + gdouble w, h; /* Width and height. */ +}; ++
+This structure defines a simple elliptical markup. +
+lglTemplateMarkupType |
+Common field. Always LGL_TEMPLATE_MARKUP_ELLIPSE for lglTemplateMarkupEllipse. | +
gdouble |
+Distance (in points) of left edge of markup from left edge of label or card. | +
gdouble |
+Distance (in points) of top edge of markup from top edge of label or card. | +
gdouble |
+Width of rectangle in points. | +
gdouble |
+Height of rectangle in points. | +
struct lglTemplateOrigin { + gdouble x, y; /* Label origin relative to upper + * upper left hand corner of paper */ +}; ++
+This structure represents the cartesian coordinates of the origin of a label or card on the page. +The orign is the upper left corner of the extent of the label or card. These coordinates are +relative to the upper left corner of the page. +
+ +lglTemplate * lgl_template_new (+const gchar *brand
, +const gchar *part
, +const gchar *description
, +const gchar *paper_id
, +gdouble page_width
, +gdouble page_height
);
+Create a new template structure, with the given top-level attributes. The
+created template will have no initial categories, or frames associated with
+it. See lgl_template_add_category()
and lgl_template_add_frame()
to add
+these.
+
|
+Template brand | +
|
+Template part name/number | +
|
+Template descriptions | +
|
+Page size id | +
|
+Page width in points, set to zero unless paper_id="Other" | +
|
+Page height in points, set to zero unless paper_id="Other" | +
Returns : |
+pointer to a newly allocated lglTemplate structure. | +
lglTemplate * lgl_template_new_from_equiv (+const gchar *brand
, +const gchar *part
, +const gchar *equiv_part
);
+Create a new template structure based on an existing template. The +created template will be a duplicate of the original template, except with +the new part name/number. +
+
|
+Template brand | +
|
+Template part name/number | +
|
+Name of equivalent part to base template on | +
Returns : |
+pointer to a newly allocated lglTemplate structure. | +
lglTemplate * lgl_template_dup (const lglTemplate *orig_template
);
++This function duplicates a template structure. +
+
|
+Template to duplicate. | +
Returns : |
+a newly allocated lglTemplate structure. | +
void lgl_template_free (lglTemplate *template
);
++This function frees all memory associated with given template structure. +
+
|
+Template to free. | +
void lgl_template_add_category (+lglTemplate *template
, +const gchar *category_id
);
+This function adds the given category ID to a templates category list. +
+
|
+Pointer to template structure | +
|
+Category ID string | +
void lgl_template_add_frame (+lglTemplate *template
, +lglTemplateFrame *frame
);
+This function adds the given frame structure to the template. Once added, +the frame structure belongs to the given template; do not attempt to free +it. +
++Note: Currently glabels only supports a single frame per template. +
+
|
+Pointer to template structure | +
|
+Pointer to frame structure | +
gchar * lgl_template_get_name (const lglTemplate *template
);
++This function returns the name of the given template. The name is the concetenation +of the brand and part name/number. +
+
|
+Pointer to template structure to test | +
Returns : |
+A pointer to a newly allocated name string. Should be freed with g_free() . |
+
gboolean lgl_template_do_templates_match (+const lglTemplate *template1
, +const lglTemplate *template2
);
+This function tests if the given templates match. This is a simple test that only tests +the brand and part name/number. It does not test if they are actually identical. +
+
|
+Pointer to 1st template structure to test | +
|
+Pointer to 2nd template structure to test | +
Returns : |
+TRUE if the two templates match. | +
gboolean lgl_template_does_brand_match (+const lglTemplate *template
, +const gchar *brand
);
+This function tests if the brand of the template matches the given brand. +
+
|
+Pointer to template structure to test | +
|
+Brand string | +
Returns : |
+TRUE if the template matches the given brand. | +
gboolean lgl_template_does_page_size_match (+const lglTemplate *template
, +const gchar *paper_id
);
+This function tests if the page size of the template matches the given ID. +
+
|
+Pointer to template structure to test | +
|
+Page size ID string | +
Returns : |
+TRUE if the template matches the given page size ID. | +
gboolean lgl_template_does_category_match (+const lglTemplate *template
, +const gchar *category_id
);
+This function tests if the given template belongs to the given category ID. +
+
|
+Pointer to template structure to test | +
|
+Category ID string | +
Returns : |
+TRUE if the template matches the given category ID. | +
gboolean lgl_template_are_templates_identical + (+const lglTemplate *template1
, +const lglTemplate *template2
);
+This function tests if the given templates have identical size and layout properties. +
+
|
+Pointer to 1st template structure to test | +
|
+Pointer to 2nd template structure to test | +
Returns : |
+TRUE if the two templates are identical. | +
lglTemplateFrame * lgl_template_frame_rect_new (+const gchar *id
, +gdouble w
, +gdouble h
, +gdouble r
, +gdouble x_waste
, +gdouble y_waste
);
+This function creates a new template frame for a rectangular label or card. +
+
|
+ID of frame. (This should currently always be "0"). | +
|
+width of frame in points. | +
|
+height of frame in points. | +
|
+radius of rounded corners in points. (Should be 0 for square corners.) | +
|
+Amount of overprint to allow in the horizontal direction. | +
|
+Amount of overprint to allow in the vertical direction. | +
Returns : |
+Pointer to newly allocated lglTemplateFrame structure. | +
lglTemplateFrame * lgl_template_frame_ellipse_new (+const gchar *id
, +gdouble w
, +gdouble h
, +gdouble waste
);
+This function creates a new template frame for an elliptical label or card. +
+
|
+ID of frame. (This should currently always be "0"). | +
|
+width of frame in points. | +
|
+height of frame in points. | +
|
+Amount of overprint to allow in points. | +
Returns : |
+Pointer to newly allocated lglTemplateFrame structure. | +
lglTemplateFrame * lgl_template_frame_round_new (+const gchar *id
, +gdouble r
, +gdouble waste
);
+This function creates a new template frame for a round label. +
+
|
+ID of frame. (This should currently always be "0"). | +
|
+radius of label in points. | +
|
+Amount of overprint to allow. | +
Returns : |
+Pointer to newly allocated lglTemplateFrame structure. | +
lglTemplateFrame * lgl_template_frame_cd_new (+const gchar *id
, +gdouble r1
, +gdouble r2
, +gdouble w
, +gdouble h
, +gdouble waste
);
+This function creates a new template frame for a CD/DVD label. +
+
|
+ID of frame. (This should currently always be "0"). | +
|
+outer radius of label in points. | +
|
+radius of center hole in points. | +
|
+clip width of frame in points for business card CDs. Should be 0 for no clipping. | +
|
+clip height of frame in points for business card CDs. Should be 0 for no clipping. | +
|
+Amount of overprint to allow. | +
Returns : |
+Pointer to newly allocated lglTemplateFrame structure. | +
lglTemplateFrame * lgl_template_frame_dup (const lglTemplateFrame *orig_frame
);
++This function duplicates a template frame structure. +
+
|
+Frame to duplicate. | +
Returns : |
+a newly allocated lglTemplateFrame structure. | +
void lgl_template_frame_free (lglTemplateFrame *frame
);
++This function frees all memory associated with given template frame structure. +
+
|
+Frame to free. | +
void lgl_template_frame_add_layout (+lglTemplateFrame *frame
, +lglTemplateLayout *layout
);
+This function adds a layout structure to the given template frame. +
+
|
+Pointer to template frame to add layout to. | +
|
+Pointer to layout structure to add to frame. | +
void lgl_template_frame_add_markup (+lglTemplateFrame *frame
, +lglTemplateMarkup *markup
);
+This function adds a markup structure to the given template frame. +
+
|
+Pointer to template frame to add markup to. | +
|
+Pointer to markup structure to add to frame. | +
void lgl_template_frame_get_size (+const lglTemplateFrame *frame
, +gdouble *w
, +gdouble *h
);
+Get size (width and height) of given lglTemplateFrame in points. +
+
|
++lglTemplateFrame structure to query | +
|
+pointer to location to receive width of frame | +
|
+pointer to location to receive height of frame | +
gint lgl_template_frame_get_n_labels (const lglTemplateFrame *frame
);
++Get total number of labels per sheet corresponding to the given frame. +
+
|
++lglTemplateFrame structure to query | +
Returns : |
+number of labels per sheet. | +
lglTemplateOrigin * lgl_template_frame_get_origins (const lglTemplateFrame *frame
);
+
+Get an array of label origins for the given frame. These origins represent the
+upper left hand corner of each label on a page corresponding to the given frame.
+The origins will be ordered geometrically left to right and then top to bottom.
+The array should be freed using g_free()
.
+
|
++lglTemplateFrame structure to query | +
Returns : |
+A newly allocated array of lglTemplateOrigin structures. | +
gchar * lgl_template_frame_get_layout_description
+ (const lglTemplateFrame *frame
);
++Get a description of the label layout including number of labels per sheet. +
+
|
++lglTemplateFrame structure to query | +
Returns : |
+a newly allocation description string. | +
gchar * lgl_template_frame_get_size_description + (+const lglTemplateFrame *frame
, +lglUnits units
);
+Get a description of the label size. +
+
|
++lglTemplateFrame structure to query | +
|
+lglUnits | +
Returns : |
+a newly allocation description string. | +
lglTemplateLayout * lgl_template_layout_new (+gint nx
, +gint ny
, +gdouble x0
, +gdouble y0
, +gdouble dx
, +gdouble dy
);
+This function creates a new layout structure with the given parameters. +
+
|
+Number of labels across. | +
|
+Number of labels down. | +
|
+X coordinate of the top-left corner of the top-left label in the layout in points. | +
|
+Y coordinate of the top-left corner of the top-left label in the layout in points. | +
|
+Horizontal pitch in points. This is the distance from left-edge to left-edge. | +
|
+Vertical pitch in points. This is the distance from top-edge to top-edge. | +
Returns : |
+a newly allocated lglTemplateLayout structure. | +
lglTemplateLayout * lgl_template_layout_dup (const lglTemplateLayout *orig_layout
);
++This function duplicates a template layout structure. +
+
|
+Layout to duplicate. | +
Returns : |
+a newly allocated lglTemplateLayout structure. | +
void lgl_template_layout_free (lglTemplateLayout *layout
);
++This function frees all memory associated with given template layout structure. +
+
|
+Layout to free. | +
lglTemplateMarkup * lgl_template_markup_margin_new (gdouble size
);
++This function creates a new margin markup structure. +
+
|
+margin size in points. | +
Returns : |
+a newly allocated lglTemplateMarkup structure. | +
lglTemplateMarkup * lgl_template_markup_line_new (+gdouble x1
, +gdouble y1
, +gdouble x2
, +gdouble y2
);
+This function creates a new line markup structure. +
+
|
+x coordinate of first endpoint. | +
|
+y coordinate of first endpoint. | +
|
+x coordinate of second endpoint. | +
|
+y coordinate of second endpoint. | +
Returns : |
+a newly allocated lglTemplateMarkup structure. | +
lglTemplateMarkup * lgl_template_markup_circle_new (+gdouble x0
, +gdouble y0
, +gdouble r
);
+This function creates a new circle markup structure. +
+
|
+x coordinate of center of circle. | +
|
+y coordinate of center of circle. | +
|
+radius of circle. | +
Returns : |
+a newly allocated lglTemplateMarkup structure. | +
lglTemplateMarkup * lgl_template_markup_rect_new (+gdouble x1
, +gdouble y1
, +gdouble w
, +gdouble h
, +gdouble r
);
+This function creates a new rectangle markup structure. +
+
|
+x coordinate of top-left corner of rectangle. | +
|
+y coordinate of top-left corner of rectangle. | +
|
+width of rectangle. | +
|
+height of rectangle. | +
|
+radius of rounded corner. | +
Returns : |
+a newly allocated lglTemplateMarkup structure. | +
lglTemplateMarkup * lgl_template_markup_ellipse_new (+gdouble x1
, +gdouble y1
, +gdouble w
, +gdouble h
);
+This function creates a new ellipse markup structure. +
+
|
+x coordinate of top-left corner of ellipse. | +
|
+y coordinate of top-left corner of ellipse. | +
|
+width of ellipse. | +
|
+height of ellipse. | +
Returns : |
+a newly allocated lglTemplateMarkup structure. | +
lglTemplateMarkup * lgl_template_markup_dup (const lglTemplateMarkup *orig_markup
);
++This function duplicates a template markup structure. +
+
|
+Markup to duplicate. | +
Returns : |
+a newly allocated lglTemplateMarkup structure. | +
void lgl_template_markup_free (lglTemplateMarkup *markup
);
++This function frees all memory associated with given template markup structure. +
+
|
+Markup to free. | +
void lgl_template_print (const lglTemplate *template
);
++Print template details (for debugging purposes). +
+
|
+template | +