Beispiel #1
0
        private void drawRect(SquareRect squareRect, DrawingContext context)
        {
            Rect rect = squareRect.rect;

            rect.Transform(matrix);
            context.DrawRectangle(squareRect.brush, squareRect.pen, rect);
        }
        private SquareRect[] generateSRects(Square[] squares)
        {
            SquareRect[] sRects = new SquareRect[squares.Length];

            for (int i = 0; i < squares.Length; i++)
            {
                sRects[i] = new SquareRect(squares[i], net.averageBottomValue, net.maxDepth);
            }

            return(sRects);
        }
        private void drawRect(SquareRect sRect, DrawingContext context)
        {
            GPoint[] points = new GPoint[]
            {
                mapView.FromLatLngToLocal(new PointLatLng(sRect.rect.Y + sRect.rect.Height, sRect.rect.X)),
                mapView.FromLatLngToLocal(new PointLatLng(sRect.rect.Y, sRect.rect.X + sRect.rect.Width))
            };

            Rect rect = new Rect(points[0].X, points[0].Y, points[1].X - points[0].X, points[1].Y - points[0].Y);;

            context.DrawRectangle(sRect.brush, sRect.pen, rect);
        }