| libmemphis Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | ||||
struct MemphisRule; #define MEMPHIS_RULE (obj) GType memphis_rule_get_type (void); #define MEMPHIS_TYPE_RULE MemphisRule * memphis_rule_new (void); MemphisRule * memphis_rule_copy (const MemphisRule *rule); void memphis_rule_free (MemphisRule *rule); enum MemphisRuleType; #define MEMPHIS_TYPE_RULE_TYPE struct MemphisRuleAttr; #define MEMPHIS_RULE_ATTR (obj) #define MEMPHIS_TYPE_RULE_ATTR MemphisRuleAttr * memphis_rule_attr_new (void); MemphisRuleAttr * memphis_rule_attr_copy (const MemphisRuleAttr *attr); void memphis_rule_attr_free (MemphisRuleAttr *attr);
struct MemphisRule {
gchar **keys;
gchar **values;
MemphisRuleType type;
MemphisRuleAttr *polygon;
MemphisRuleAttr *line;
MemphisRuleAttr *border;
MemphisRuleAttr *text;
};
Defines a drawing rule for the MemphisRuleSet.
| an array of key strings | |
| an array of value strings | |
MemphisRuleType |
the type of the rule |
MemphisRuleAttr * |
a pointer to the polygon or NULL |
MemphisRuleAttr * |
a pointer to the line or NULL |
MemphisRuleAttr * |
a pointer to the border or NULL |
MemphisRuleAttr * |
a pointer to the text or NULL |
Since 0.1
MemphisRule * memphis_rule_new (void);
Creates a newly allocated MemphisRule to be freed
with memphis_rule_free().
Returns : |
a MemphisRule. |
Since 0.1
MemphisRule * memphis_rule_copy (const MemphisRule *rule);
Makes a copy of the memphis rule structure. The result must be
freed using memphis_rule_free().
|
a MemphisRule |
Returns : |
an allocated copy of rule. |
Since 0.1
void memphis_rule_free (MemphisRule *rule);
Frees a memphis rule structure created with memphis_rule_new() or
memphis_rule_copy().
|
a MemphisRule |
Since 0.1
typedef enum {
MEMPHIS_RULE_TYPE_UNKNOWN,
MEMPHIS_RULE_TYPE_NODE,
MEMPHIS_RULE_TYPE_WAY,
MEMPHIS_RULE_TYPE_RELATION
} MemphisRuleType;
Defines a the data type of the rule. Only ways are supported in Memphis 0.1.x.
| unknown | |
| a node | |
| a way | |
| a realtion |
Since 0.1
struct MemphisRuleAttr {
guint8 z_min;
guint8 z_max;
guint8 color_red;
guint8 color_green;
guint8 color_blue;
guint8 color_alpha;
gchar *style;
gdouble size;
};
Defines the drawing attributes for a MemphisRule.
| minimum visible zoom level | |
| maximum visible zoom level | |
| red component, between 0 and 255 | |
| green component, between 0 and 255 | |
| blue component, between 0 and 255 | |
| transparency component, between 0 and 255 | |
| field for future use (line style, polygon pattern...) | |
| the size |
Since 0.1
MemphisRuleAttr * memphis_rule_attr_new (void);
Returns : |
a new MemphisRuleAttr. |
Since 0.2.2
MemphisRuleAttr * memphis_rule_attr_copy (const MemphisRuleAttr *attr);
|
a MemphisRuleAttr |
Returns : |
a copy of the rule attribute. |
Since 0.2.2
void memphis_rule_attr_free (MemphisRuleAttr *attr);
Frees the memory of a MemphisRuleAttr.
|
a MemphisRuleAttr |
Since 0.2.2