| libmemphis Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
MemphisRule; MemphisRuleAttr; #define MEMPHIS_RULE (obj) enum MemphisRuleType; 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);
typedef struct {
gchar **keys;
gchar **values;
MemphisRuleType type;
MemphisRuleAttr *polygon;
MemphisRuleAttr *line;
MemphisRuleAttr *border;
MemphisRuleAttr *text;
} MemphisRule;
Defines a drawing rule for the MemphisRuleSet.
gchar ** |
an array of key strings |
gchar ** |
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
typedef struct {
guint8 z_min;
guint8 z_max;
guint8 color_red;
guint8 color_green;
guint8 color_blue;
guint8 color_alpha;
gchar *style;
gdouble size;
} MemphisRuleAttr;
Defines the drawing attributes for a MemphisRule.
guint8 |
minimum visible zoom level |
guint8 |
maximum visible zoom level |
guint8 |
red component, between 0 and 255 |
guint8 |
green component, between 0 and 255 |
guint8 |
blue component, between 0 and 255 |
guint8 |
transparency component, between 0 and 255 |
gchar * |
field for future use (line style, polygon pattern...) |
gdouble |
the size |
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
MemphisRule * memphis_rule_copy (const MemphisRule *rule);
|
a MemphisRule |
Returns : |
a copy of the rule. |
Since 0.1
void memphis_rule_free (MemphisRule *rule);
Frees the memory of a MemphisRule.
|
a MemphisRule |
Since 0.1