110,536
社区成员
发帖
与我相关
我的任务
分享
public Bitmap DrawMarker(int Input)
{
Bitmap marker = new Bitmap(25, 40);
Bitmap midMarker = new Bitmap(50, 80);
Graphics pictureBack = Graphics.FromImage(midMarker);
pictureBack.SmoothingMode = SmoothingMode.AntiAlias;
GraphicsPath markerCenterPath = new GraphicsPath();
GraphicsPath markerPath = new GraphicsPath();
markerCenterPath.AddEllipse(new Rectangle(13, 14, 25, 25));
markerPath.AddBezier(new Point(25, 80), new Point(25, 55), new Point(5, 40), new Point(5, 35));
markerPath.AddBezier(new Point(5, 35), new Point(0, 25), new Point(6, 12), new Point(7, 10));
markerPath.AddBezier(new Point(7, 10), new Point(15, -1), new Point(35, -1), new Point(43, 10));
markerPath.AddBezier(new Point(43, 10), new Point(44, 12), new Point(50, 25), new Point(45, 35));
markerPath.AddBezier(new Point(45, 35), new Point(45, 40), new Point(25, 55), new Point(25, 80));
pictureBack.FillPath(new SolidBrush(Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128)))))), markerPath);
pictureBack.FillPath(new SolidBrush(Color.Yellow), markerCenterPath);
pictureBack.DrawPath(new Pen(Color.Brown, 2), markerPath);
pictureBack.DrawString(Input.ToString(), new Font("微软雅黑", 20, FontStyle.Bold), new SolidBrush(Color.Black), 14, 9);
Graphics pictureBackEnd = Graphics.FromImage(marker);
pictureBackEnd.SmoothingMode = SmoothingMode.AntiAlias;
pictureBackEnd.DrawImage(midMarker, new Point[] { new Point(0, 0), new Point(marker.Width, 0), new Point(0, marker.Height) });
return marker;
}
airportmodel = new google.maps.Marker({
position: mapProp.center,
map: map,
icon: window.external.DrawMarker()
});