summaryrefslogtreecommitdiff
path: root/proto
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-01-27 17:21:48 +0100
committerKonstantin Käfer <mail@kkaefer.com>2014-01-27 17:21:48 +0100
commit1538ebaf220ebc25243f2f71eb26c91cdf10548a (patch)
tree54bbd059b13ff966af877171b19fa304f415b51a /proto
parente2dbcc95b5cf171e99e237513998d17a0c70f3ad (diff)
downloadqtlocation-mapboxgl-1538ebaf220ebc25243f2f71eb26c91cdf10548a.tar.gz
cascade styles
Diffstat (limited to 'proto')
-rw-r--r--proto/style.proto44
1 files changed, 37 insertions, 7 deletions
diff --git a/proto/style.proto b/proto/style.proto
index d5f1c6c9f5..5a977d799c 100644
--- a/proto/style.proto
+++ b/proto/style.proto
@@ -2,6 +2,8 @@ enum bucket_type {
fill = 1;
line = 2;
point = 3;
+
+ background = 15;
}
enum cap_type {
@@ -13,6 +15,17 @@ enum join_type {
bevel = 2;
}
+enum winding_type {
+ evenodd = 1;
+ nonzero = 2;
+}
+
+enum property_type {
+ null = 1;
+ constant = 2;
+ stops = 3;
+}
+
message value {
// Exactly one of these values may be present in a valid message
optional string string_value = 1;
@@ -49,21 +62,38 @@ message layer {
repeated layer child_layer = 3;
}
-message width {
- optional string scaling = 1;
+message property {
+ required property_type function = 1;
repeated float value = 2 [ packed = true ];
}
-message layer_style {
+message fill_style {
+ required string layer_name = 1;
+ optional property hidden = 2;
+ optional winding_type winding = 3 [ default = nonzero ];
+ optional property antialias = 4;
+ optional fixed32 fill_color = 5 [ default = 0x000000FF ]; // rgba (=> rgb << 8 | 0xFF for opaque!)
+ optional fixed32 stroke_color = 6; // if none is specified, no stroke will be painted
+ optional property opacity = 7; // values from 0..1
+ // TODO: translate x/y
+}
+
+message stroke_style {
required string layer_name = 1;
- optional fixed32 color = 2; // rgba (=> rgb << 8 | 0xFF for opaque!)
- optional bool antialias = 3;
- optional width width = 4;
+ optional property hidden = 2;
+ optional fixed32 color = 3 [ default = 0x000000FF ]; // rgba (=> rgb << 8 | 0xFF for opaque!)
+ optional property width = 4;
+ optional property offset = 5;
+ // line join + line cap are already defined in the
+ // TODO: dasharray
+ // TODO: image/icon
+ // TODO: translate x/y
}
message class {
required string name = 1;
- repeated layer_style layer = 2;
+ repeated fill_style fill = 2;
+ repeated stroke_style stroke = 3;
}
// root level object