Top | ![]() |
![]() |
![]() |
![]() |
MemphisRuleSet * | memphis_rule_set_new () |
void | memphis_rule_set_free () |
void | memphis_rule_set_load_from_file () |
void | memphis_rule_set_load_from_data () |
void | memphis_rule_set_set_bg_color () |
void | memphis_rule_set_get_bg_color () |
GList * | memphis_rule_set_get_rule_ids () |
void | memphis_rule_set_set_rule () |
MemphisRule * | memphis_rule_set_get_rule () |
gboolean | memphis_rule_set_remove_rule () |
This Object defines drawing rules for a MemphisRenderer. The rules can be loaded from an XML file or can they be defined during execution time.
void
memphis_rule_set_free (MemphisRuleSet *rules
);
Frees the memory of a MemphisRuleSet.
Since 0.1
void memphis_rule_set_load_from_file (MemphisRuleSet *rules
,const gchar *filename
,GError **error
);
Load rules from an XML file.
Since 0.2
void memphis_rule_set_load_from_data (MemphisRuleSet *rules
,const gchar *data
,guint size
,GError **error
);
Load rules data from an XML file.
rules |
||
data |
a character array with rules XML data |
|
size |
the size of the array |
|
error |
a pointer to a GError or NULL |
Since 0.2
void memphis_rule_set_set_bg_color (MemphisRuleSet *rules
,guint8 r
,guint8 g
,guint8 b
,guint8 a
);
Sets the background color and transparency rule.
rules |
||
r |
red color component |
|
g |
green color component |
|
b |
blue color component |
|
a |
transparency |
Since 0.1
void memphis_rule_set_get_bg_color (MemphisRuleSet *rules
,guint8 *r
,guint8 *g
,guint8 *b
,guint8 *a
);
Assigns the background color and the transparency of the background to r, g, b and a.
rules |
||
r |
red color component. |
[out] |
g |
green color component. |
[out] |
b |
blue color component. |
[out] |
a |
transparency. |
[out] |
Since 0.1
GList *
memphis_rule_set_get_rule_ids (MemphisRuleSet *rules
);
a list of rule id strings. Free the list with g_list_free when done.
These strings have the following form: key1|key2|...|keyN:value1|value2|...|valueM
Example: "waterway:river|stream|canal".
[transfer full]
Since 0.1
void memphis_rule_set_set_rule (MemphisRuleSet *rules
,MemphisRule *rule
);
Adds the given rule to the rule set.
Since 0.1
MemphisRule * memphis_rule_set_get_rule (MemphisRuleSet *rules
,const gchar *id
);
Since 0.1
gboolean memphis_rule_set_remove_rule (MemphisRuleSet *rules
,const gchar *id
);
Removes the rule with the given id from the rules set.
Since 0.1