コード例 #1
0
 public void ShowCallTip(Pos pos, string text)
 {
     using (var g = editor.CreateGraphics())
     {
         var info = ProcessHtmlString(text);
         ShowCallTip(g, pos, info.Size, (gr, pt) => DrawTip(info, gr, pt));
     }
 }
コード例 #2
0
ファイル: CaretRenderer.cs プロジェクト: vorov2/slot
        private void Tick(object sender, EventArgs e)
        {
            if ((!editor.Focused && timerDraw) ||
                editor.Buffer == null ||
                OverlapRectangle(editor.CallTips.TipRectangle) ||
                editor.ReadOnly)
            {
                return;
            }

            using (var g = editor.CreateGraphics())
            {
                g.TranslateTransform(editor.Scroll.ScrollPosition.X, editor.Scroll.ScrollPosition.Y);

                if (timerDraw && timerBitmap != null)
                {
                    DrawSurface(g, caretX, caretY);
                }
                else
                {
                    DrawCaret(g, caretX, caretY, true);
                }
            }

            timerDraw = !timerDraw;
        }