X-Git-Url: https://git.sur5r.net/?p=glabels;a=blobdiff_plain;f=docs%2Flibglabels%2Fhtml%2Flibglabels-3.0-units.html;h=a9ff255684e74090a20c08e7040774d1627d1978;hp=31ba20eaa8c17e619c135cab5b121235cc78b709;hb=3a3a8a58b7539da4d1f1ac5e7f1675cff1269901;hpb=c84c942a262c1bb22d8e0bc7d7808f11209c8f8b diff --git a/docs/libglabels/html/libglabels-3.0-units.html b/docs/libglabels/html/libglabels-3.0-units.html index 31ba20ea..a9ff2556 100644 --- a/docs/libglabels/html/libglabels-3.0-units.html +++ b/docs/libglabels/html/libglabels-3.0-units.html @@ -2,30 +2,27 @@ -Units - +LibGlabels 3.0 Reference Manual: Units + - + - - - - - - - - - - + + + + + + +
@@ -33,233 +30,347 @@

Units

Units — Type to represent units of distance supported by libglabels

- +
-
-

Synopsis

-
-#include <libglabels/lgl-units.h>
-
-enum                lglUnits;
-const gchar *       lgl_units_get_id                    (lglUnits units);
-lglUnits            lgl_units_from_id                   (const gchar *id);
-const gchar *       lgl_units_get_name                  (lglUnits units);
-lglUnits            lgl_units_from_name                 (const gchar *name);
-gdouble             lgl_units_get_points_per_unit       (lglUnits units);
-gdouble             lgl_units_get_units_per_point       (lglUnits units);
-
-
-
-

Description

-

-This section defines a type to represent the various units of distance -supported by libglabels. It also defines a set of related functions. -

-
-

Details

-
-

enum lglUnits

-
typedef enum {
-        LGL_UNITS_POINT, /* encoded as "pt" */
-        LGL_UNITS_INCH,  /* encoded as "in" */
-        LGL_UNITS_MM,    /* encoded as "mm" */
-        LGL_UNITS_CM,    /* encoded as "cm" */
-        LGL_UNITS_PICA,  /* encoded as "pc" */
-
-        LGL_UNITS_FIRST = LGL_UNITS_POINT,
-        LGL_UNITS_LAST  = LGL_UNITS_PICA,
-
-        LGL_UNITS_INVALID = -1
-} lglUnits;
-
-

-This enumeration defines supported units of distance. -

-
-+

Functions

+
++++ - - - - - - - - - - - - - - + - - + - - + - - +

LGL_UNITS_POINT

Points. +const gchar *

LGL_UNITS_INCH

Inches. + +lgl_units_get_id ()

LGL_UNITS_MM

Millimeters + +lglUnits

LGL_UNITS_CM

Centimeters + +lgl_units_from_id ()

LGL_UNITS_PICA

Picas +const gchar * + +lgl_units_get_name ()

LGL_UNITS_FIRST

First supported unit. (Used for bounds checking and iteration through supported units.) + +lglUnits + +lgl_units_from_name ()

LGL_UNITS_LAST

Last supported unit. (Used for bounds checking and iteration through supported units.) + +gdouble + +lgl_units_get_points_per_unit ()

LGL_UNITS_INVALID

Invalid unit. (Returned by libglabels units functions when a supported unit cannot be determined.) + +gdouble + +lgl_units_get_units_per_point ()
-
-
-

lgl_units_get_id ()

-
const gchar *       lgl_units_get_id                    (lglUnits units);
+
+

Types and Values

+
++++ + + + + +
enumlglUnits
+
+
+

Object Hierarchy

+
+
+
+
+

Includes

+
#include <libglabels/lgl-units.h>
+
+
+
+

Description

-Return a unique ID string for the given units. This ID is how units +This section defines a type to represent the various units of distance +supported by libglabels. It also defines a set of related functions. +

+
+
+

Functions

+
+

lgl_units_get_id ()

+
const gchar *
+lgl_units_get_id (lglUnits units);
+

Return a unique ID string for the given units. This ID is how units are encoded in libglabels XML files and will remain constant across all locales. IDs are identical to the absolute length units supported -in the CSS2 Specification (Section 4.3.2). -

-
-- - - - - - - - - - +in the CSS2 Specification (Section 4.3.2).

+
+

Parameters

+

units :

Units (lglUnits)

Returns :

ID string.
+++++ + + + + +

units

Units (lglUnits)

 
+
+

Returns

+

ID string.

+

+
+

-

lgl_units_from_id ()

-
lglUnits            lgl_units_from_id                   (const gchar *id);
-

-Return the unique lglUnits for the given ID string. +

lgl_units_from_id ()

+
lglUnits
+lgl_units_from_id (const gchar *id);
+

Return the unique lglUnits for the given ID string. This ID is how units are encoded in libglabels XML files and will remain constant across all locales. IDs are identical to the absolute length -units supported in the CSS2 Specification (Section 4.3.2). -

-
-- - - - - - - - - - +units supported in the CSS2 Specification (Section 4.3.2).

+
+

Parameters

+

id :

ID string

Returns :

units (lglUnits).
+++++ + + + + +

id

ID string

 
+
+

Returns

+

units (lglUnits).

+

+
+

-

lgl_units_get_name ()

-
const gchar *       lgl_units_get_name                  (lglUnits units);
-

-Return a unique name string for the given units. This name is human -readable and will be translated to the current locale. -

-
-- - - - - - - - - - +

lgl_units_get_name ()

+
const gchar *
+lgl_units_get_name (lglUnits units);
+

Return a unique name string for the given units. This name is human +readable and will be translated to the current locale.

+
+

Parameters

+

units :

Units (lglUnits)

Returns :

name string.
+++++ + + + + +

units

Units (lglUnits)

 
+
+

Returns

+

name string.

+

+
+

-

lgl_units_from_name ()

-
lglUnits            lgl_units_from_name                 (const gchar *name);
-

-Return the unique lglUnits for the given name string. This name is -human readable and is expected to be translated to the current locale. -

-
-- - - - - - - - - - +

lgl_units_from_name ()

+
lglUnits
+lgl_units_from_name (const gchar *name);
+

Return the unique lglUnits for the given name string. This name is +human readable and is expected to be translated to the current locale.

+
+

Parameters

+

name :

NAME string

Returns :

units (lglUnits).
+++++ + + + + +

name

NAME string

 
+
+

Returns

+

units (lglUnits).

+

+
+

-

lgl_units_get_points_per_unit ()

-
gdouble             lgl_units_get_points_per_unit       (lglUnits units);
-

-Return a scale factor for the given units in points/unit. -

-
-- - - - - - - - - - +

lgl_units_get_points_per_unit ()

+
gdouble
+lgl_units_get_points_per_unit (lglUnits units);
+

Return a scale factor for the given units in points/unit.

+
+

Parameters

+

units :

Units (lglUnits)

Returns :

scale factor.
+++++ + + + + +

units

Units (lglUnits)

 
+
+

Returns

+

scale factor.

+

+
+
-

lgl_units_get_units_per_point ()

-
gdouble             lgl_units_get_units_per_point       (lglUnits units);
+

lgl_units_get_units_per_point ()

+
gdouble
+lgl_units_get_units_per_point (lglUnits units);
+

Return a scale factor for the given units in units/point.

+
+

Parameters

+
+++++ + + + + + +

units

Units (lglUnits)

 
+
+
+

Returns

+

scale factor.

+

+
+
+ +
+

Types and Values

+
+

enum lglUnits

-Return a scale factor for the given units in units/point. +This enumeration defines supported units of distance.

-
-+
+

Members

+
+++++ - - + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + +

units :

Units (lglUnits)

LGL_UNITS_POINT

+

Points.

+
 

LGL_UNITS_INCH

+

Inches.

+
 

LGL_UNITS_MM

+

Millimeters

+
 

LGL_UNITS_CM

+

Centimeters

+
 

Returns :

scale factor.

LGL_UNITS_PICA

+

Picas

+
 

LGL_UNITS_FIRST

+

First supported unit. (Used for bounds checking and iteration through supported units.)

+
 

LGL_UNITS_LAST

+

Last supported unit. (Used for bounds checking and iteration through supported units.)

+
 

LGL_UNITS_INVALID

+

Invalid unit. (Returned by libglabels units functions when a supported unit cannot be determined.)

+
 
+ + Generated by GTK-Doc V1.20 \ No newline at end of file