첨부 실행 코드는 나눔고딕코딩 폰트를 사용합니다.
728x90
반응형
728x170
using System.Drawing;
using System.Drawing.Drawing2D;

#region 폼 페인트 처리하기 - Form_Paint(sender, e)

/// <summary>
/// 폼 페인트 처리하기
/// </summary>
/// <param name="sender">이벤트 발생자</param>
/// <param name="e">이벤트 인자</param>
private void Form_Paint(object pSender, PaintEventArgs e)
{
    using(BufferedGraphics bufferedGraphics = BufferedGraphicsManager.Current.Allocate(e.Graphics, ClientRectangle))
    {
        bufferedGraphics.Graphics.Clear(Color.Silver);

        bufferedGraphics.Graphics.InterpolationMode = InterpolationMode.High;

        bufferedGraphics.Graphics.SmoothingMode = SmoothingMode.AntiAlias;

        bufferedGraphics.Graphics.TranslateTransform
        (
            AutoScrollPosition.X,
            AutoScrollPosition.Y
        );

        Pen pen = new Pen(Color.FromArgb(111, 91, 160), 3);

        bufferedGraphics.Graphics.DrawLine(pen, 0, 0, 100, 100);

        pen.Dispose();

        bufferedGraphics.Render(e.Graphics);
    }
}

#endregion
728x90
반응형
그리드형(광고전용)
Posted by icodebroker

댓글을 달아 주세요