Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想使用 GMap.Net 的 route 方法绘制路线。但是,当我用新颜色将任何点添加到路线列表中时,所有路线的颜色都发生了变化。因此,它似乎只能对路线使用一种颜色。有没有办法在路线中使用两种或多种颜色?
你可以这样做:
route.Stroke= (Pen)route.Stroke.Clone(); route.Stroke.Color = Color.Orange;
在向列表添加新路线时,创建一个画笔对象并将其分配给 route.stroke 方法,如下所示
Brush = New System.Drawing.SolidBrush(Color.FromArgb(80, Color.Blue)) r.Stroke = New Pen(Brush, 10)