Beispiel #1
0
        internal static void DrawIcon(Tile.Feature f, float scale, CanvasDrawingSession session, CanvasSvgDocument icon, Color black, Color darkGray)
        {
            float        iconSize = 0.001f;
            Queue <uint> q        = new Queue <uint>(f.Geometries);
            float        cx       = 0;
            float        cy       = 0;

            if (f.Type == Tile.GeomType.Point)
            {
                var cmd = DecodeCommand(q.Dequeue());
                cx += DecodeParameter(q.Dequeue()) * scale;
                cy += DecodeParameter(q.Dequeue()) * scale;
                var m = session.Transform;
                session.Transform = Matrix3x2.CreateScale(0.25f, new Vector2(cx, cy)) * Matrix3x2.CreateTranslation(-2, -2);
                session.DrawSvg(icon, new Windows.Foundation.Size(iconSize, iconSize), cx - iconSize / 2f, cy - iconSize / 2f);
                session.Transform = m;
                //session.DrawCircle(cx, cy, 0.1f, Colors.Red);
            }
        }