fix :drawn
authorRichard Fairhurst <richard@systemed.net>
Sat, 28 Nov 2009 11:30:29 +0000 (11:30 +0000)
committerRichard Fairhurst <richard@systemed.net>
Sat, 28 Nov 2009 11:30:29 +0000 (11:30 +0000)
net/systemeD/halcyon/styleparser/PointStyle.as
net/systemeD/halcyon/styleparser/ShapeStyle.as
net/systemeD/halcyon/styleparser/ShieldStyle.as
net/systemeD/halcyon/styleparser/Style.as
net/systemeD/halcyon/styleparser/StyleChooser.as
net/systemeD/halcyon/styleparser/TextStyle.as

index e426bdbb7e64e35d511fc4461b660a4379538f17..e95d2ddb81a00bcb17daf3045097950f282c34ad 100644 (file)
@@ -12,6 +12,10 @@ package net.systemeD.halcyon.styleparser {
                                'icon_image','icon_width','icon_height','rotation'
                        ];
                }
+               
+               override public function get drawn():Boolean {
+                       return (icon_image!=null);
+               }
        }
 
 }
index d440a361c54562fd581da2e0d3f43af13bc255b3..4f5358603df9e8b6ed38549dc3aa58f61c5e3e92 100644 (file)
@@ -28,6 +28,10 @@ package net.systemeD.halcyon.styleparser {
                        ];
                }
                
+               override public function get drawn():Boolean {
+                       return (fill_image || fill_color || width || casing_width);
+               }
+
                public function applyStrokeStyle(g:Graphics):void {
                        g.lineStyle(width,
                                                color ? color : 0,
index fad84f0f3e04fc5fa73d6a1d6d2d1b3ad4ce32b9..667ba2e1db5798e0d6f5fcd76d264656be9e4283 100644 (file)
@@ -12,5 +12,10 @@ package net.systemeD.halcyon.styleparser {
                                'shield_image','shield_width','shield_height'
                        ];
                }
+               
+               override public function get drawn():Boolean {
+                       return (shield_image!=null);
+               }
+
        }
 }
index cd5b608adb989665221ac03acee85df7f7f901a0..72fdc1f67b379017186f9449734f8180f1fd687c 100755 (executable)
@@ -37,12 +37,16 @@ package net.systemeD.halcyon.styleparser {
                        this.merged=true;
                }
 
-               // Getter (to be overridden) for property list
+               // Getters (to be overridden)
 
                public function get properties():Array {
                        return [];
                }
                
+               public function get drawn():Boolean {
+                       return false;
+               }
+               
                // Eval handling
                
                public function hasEvals():Boolean {
index 71831714fba723f17788a2d3c62d8e2975e0d3fc..3586212d964126c5910a3eb72a5f0f805b9f0024 100755 (executable)
@@ -1,6 +1,7 @@
 package net.systemeD.halcyon.styleparser {
 
        import net.systemeD.halcyon.connection.Entity;
+       import net.systemeD.halcyon.Globals;
 
        public class StyleChooser {
 
@@ -55,9 +56,8 @@ package net.systemeD.halcyon.styleparser {
                                        }
                                        continue;
                                }
-                               if (a.width) { tags['stroked']='yes'; }
-                               if (a.width || a.fill_color || a.fill_image || a.casing_width || a.icon_image) { tags['drawn']='yes'; }
-
+                               if (r.drawn) { tags[':drawn']='yes'; }
+                               
                                r.runEvals(tags);
                                if (a[r.sublayer]) {
                                        // If there's already a style on this sublayer, then merge them
index bf3d4f1000a0661e8dd6e07d71ec12134e6c38ad..e353e26804745e7d2626f393c657f12daa20931b 100644 (file)
@@ -32,7 +32,10 @@ package net.systemeD.halcyon.styleparser {
                        ];
                }
 
-               
+               override public function get drawn():Boolean {
+                       return (text!=null);
+               }
+
                public function getTextFormat():TextFormat {
                        var tf:TextFormat=new TextFormat(font_family    ? font_family   : "DejaVu",
                                                         font_size      ? font_size     : 8,