Draw multiple strokes, label POIs, and much much more fun.
[potlatch2.git] / net / systemeD / halcyon / styleparser / Rule.as
1 package net.systemeD.halcyon.styleparser {
2
3         public class Rule {
4
5                 public var conditions:Array;
6                 public var breaker:Boolean = true;
7                 public var isAnd:Boolean = true;
8                 public var minScale:uint = 19;
9                 public var maxScale:uint = 13;
10                 public var hasTags:Boolean = false;
11                 public var setTags:Object = {};
12                 
13                 public function test(tags:Object):Boolean {
14                         var v:Boolean; var i:uint=0;
15                         for each (var condition:Condition in conditions) {
16                                 var r:Boolean=condition.test(tags);
17                                 if (i==0) { v=r; }
18                                 else if (isAnd) { v=v && r; }
19                                 else { v = v || r;}
20                                 i++;
21                         }
22                         return v;
23                 }
24         }
25 }