Exemplo n.º 1
0
        //@Override
        public bool draw(BoundingBox boundingBox, byte zoomLevel, Canvas canvas, MapPoint canvasPosition)
        {
            lock (this.polygonalChains) {
                if (!this.polygonalChains.Any() || (this.paintStroke == null && this.paintFill == null))
                {
                    return(false);
                }


                for (int i = 0; i < this.polygonalChains.Count; ++i)
                {
                    PolygonalChain polygonalChain = this.polygonalChains[i];
                    Path           closedPath     = polygonalChain.draw(zoomLevel, canvasPosition, true);
                    //closedPath.setFillType(FillType.EVEN_ODD);
                    if (closedPath != null)
                    {
                        OverlayUtils.SetShapeFormat(this.paintStroke, this.paintFill, closedPath);
                        canvas.Children.Add(closedPath);
                    }
                }

                return(true);
            }
        }
Exemplo n.º 2
0
 /**
  * @param polygonalChain
  *            the new polygonal chain of this polyline (may be null).
  */
 public void setPolygonalChain(PolygonalChain polygonalChain)
 {
     this.polygonalChain = polygonalChain;
 }
Exemplo n.º 3
0
 /**
  * @param polygonalChain
  *            the initial polygonal chain of this polyline (may be null).
  * @param paintStroke
  *            the initial {@code Paint} used to stroke this polyline (may be null).
  */
 public Polyline(PolygonalChain polygonalChain, Paint paintStroke)
 {
     this.polygonalChain = polygonalChain;
     this.paintStroke    = paintStroke;
 }