[나크21] 캐주얼 미니스커트 치마바지 NK21-P-10
BLOG main image
분류 전체보기 (540)
▩▩ 개인공간 ▩▩ (124)
▩▩ 문화생활 ▩▩ (45)
▩▩ 게임 ▩▩ (211)
▩▩ 일러스트 ▩▩ (46)
▩▩ 프로그래밍 ▩▩ (73)
▩▩ 코스메틱 ▩▩ (1)
▩▩ 여행 ▩▩ (0)
* 셈틀 롤드컵 * (1)
반응형
Total
Today hit
Yesterday hit
▩▩ 프로그래밍 ▩▩/C#
반응형

public class CustomMarker : GMapMarker
{
    Pen Pen1;
    SolidBrush Brush1;
    SolidBrush Brush2;

    public CustomMarker(PointLatLng p, Color fillColor)
        : base(p)
    {
        Pen1 = new Pen(Color.Black, 1.6f);
        Brush1 = new SolidBrush(Color.Black);
        Brush2 = new SolidBrush(fillColor);
    }

    public override void OnRender(Graphics g)
    {
        g.SmoothingMode = SmoothingMode.AntiAlias;
        GraphicsPath GraphicsPath1 = new GraphicsPath();
        GraphicsPath1.AddBeziers(new Point(LocalPosition.X + 1, LocalPosition.Y), new Point(LocalPosition.X, LocalPosition.Y - 7), new Point(LocalPosition.X - 1, LocalPosition.Y - 13), new Point(LocalPosition.X - 7, LocalPosition.Y - 19));
        GraphicsPath1.AddBeziers(new Point(LocalPosition.X + 9, LocalPosition.Y - 19), new Point(LocalPosition.X + 3, LocalPosition.Y - 13), new Point(LocalPosition.X + 3, LocalPosition.Y - 7), new Point(LocalPosition.X + 1, LocalPosition.Y));

        GraphicsPath GraphicsPath2 = new GraphicsPath();
        GraphicsPath2.AddEllipse(LocalPosition.X - 8, LocalPosition.Y - 33, 18, 18);
        g.FillPath(Brush2, GraphicsPath2);
        g.DrawPath(Pen1, GraphicsPath2);
        g.SetClip(new Rectangle(LocalPosition.X - 10, LocalPosition.Y - 17, 21, 18));
        g.FillPath(Brush2, GraphicsPath1);
        g.DrawPath(Pen1, GraphicsPath1);
        g.ResetClip();
        //g.FillEllipse(Brush1, new Rectangle(LocalPosition.X + 6, LocalPosition.Y + 6, 7, 7)); // <-- 안에 점넣는거
    }
}


무식하게 직접 마커 그린 뒤 안에 원하는 색채워 넣는 식
외국사이트에서 퍼와서 내입맛에 맞게 고침

제공하는 Marker엔 없는 색깔들 ㅎ


 

반응형