コード例 #1
0
ファイル: Polygon.cs プロジェクト: warny/MapForge.Net
        //@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);
            }
        }
コード例 #2
0
ファイル: Polyline.cs プロジェクト: warny/MapForge.Net
 /**
  * @param polygonalChain
  *            the new polygonal chain of this polyline (may be null).
  */
 public void setPolygonalChain(PolygonalChain polygonalChain)
 {
     this.polygonalChain = polygonalChain;
 }
コード例 #3
0
ファイル: Polyline.cs プロジェクト: warny/MapForge.Net
 /**
  * @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;
 }