Пример #1
0
        public void Invalidate()
        {
            if (Scintilla != null && Start > 0)
            {
                INativeScintilla _ns = Scintilla as INativeScintilla;
                int x = _ns.PointXFromPosition(Start);
                int y = _ns.PointYFromPosition(Start) + _ns.TextHeight(0) - 2;

                //	Invalidate the old Marker Location so that we don't get "Ghosts"
                Scintilla.Invalidate(new Rectangle(x - 2, y, 5, 5));
            }
        }
Пример #2
0
        protected internal override void Paint(Graphics g)
        {
            base.Paint(g);

            if (IsDisposed)
            {
                return;
            }

            INativeScintilla _ns = Scintilla as INativeScintilla;

            int x = _ns.PointXFromPosition(Start);
            int y = _ns.PointYFromPosition(Start) + _ns.TextHeight(0) - 2;

            //	Draw a red Triangle with a dark red border at the marker position
            g.FillPolygon(Brushes.Lime, new Point[] { new Point(x - 2, y + 4), new Point(x, y), new Point(x + 2, y + 4) });
            g.DrawPolygon(Pens.Green, new Point[] { new Point(x - 2, y + 4), new Point(x, y), new Point(x + 2, y + 4) });
        }