[Potlatch-dev] WayUI.as -> Triangle line decoration
Rafał Rudzik
rrudzik at gmail.com
Tue Jan 11 21:59:34 GMT 2011
Triangle line decoration for ways tagged natural=cliff
Index: WayUI.as
===================================================================
--- WayUI.as (revision 25026)
+++ WayUI.as (working copy)
@@ -474,6 +474,19 @@
g.endFill();
}
break;
+ case 'triangle':
+ w=s.width*10; //triangle egde
+ g.lineStyle(1,c);
+ for each (seg in segments) {
+ g.beginFill(c);
+ angle0 = -Math.atan2(seg[3], seg[2]) + Math.PI / 2; //0
+ angle1 = -Math.atan2(seg[3], seg[2]) - Math.PI/6; //60
+ g.moveTo(seg[0], seg[1]);//start 0,0
+ g.lineTo(seg[0] - w * Math.sin(angle0), seg[1] - w * Math.cos(angle0));
+ g.lineTo(seg[0] + w * Math.sin(angle1), seg[1] + w * Math.cos(angle1));
+ g.endFill();
+ }
+ break;
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: WayUI.as.diff
Type: application/octet-stream
Size: 731 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/potlatch-dev/attachments/20110111/464777d0/attachment.obj>
More information about the Potlatch-dev
mailing list