BufferedGraphics BufferedGraphics BufferedGraphics BufferedGraphics Class

정의

이중 버퍼링을 위한 그래픽 버퍼를 제공합니다.Provides a graphics buffer for double buffering.

public ref class BufferedGraphics sealed : IDisposable
public sealed class BufferedGraphics : IDisposable
type BufferedGraphics = class
    interface IDisposable
Public NotInheritable Class BufferedGraphics
Implements IDisposable
상속
BufferedGraphicsBufferedGraphicsBufferedGraphicsBufferedGraphics
구현

예제

다음 코드 예제에서는 BufferedGraphics 구현을 버퍼링 하는 여러 유형의 사용 하 여 그래픽을 그릴 개체입니다.The following code example demonstrates using a BufferedGraphics object to draw graphics using several types of buffering implementations. 양식을 클릭 하면 또는 시작한 그리기 업데이트를 발생 하는 타이머를 중지 합니다.Clicking the form alternately starts and stops a timer that causes draw updates. 그리기 업데이트를 통해 이중 버퍼링 효과 확인할 수 있습니다.The draw updates allow you to observe the effect of double buffering. 다음 그리기 모드를 통해 폼 주기를 마우스 오른쪽 단추로 클릭 합니다.Right-clicking the form cycles through the following drawing modes:

각 모드의 현재 모드를 식별 하 고 각 마우스 단추를 누를 때 발생 하는 동작을 설명 하는 텍스트를 그립니다.In each mode, text is drawn that identifies the current mode and describes the behavior that occurs when each mouse button is pressed.

#using <System.Windows.Forms.dll>
#using <System.Drawing.dll>
#using <System.dll>

using namespace System;
using namespace System::ComponentModel;
using namespace System::Drawing;
using namespace System::Windows::Forms;

namespace BufferingExample
{
   public ref class BufferingExample: public Form
   {
   private:
      BufferedGraphicsContext^ context;
      BufferedGraphics^ grafx;
      Byte bufferingMode;
      array<String^>^bufferingModeStrings;
      System::Windows::Forms::Timer^ timer1;
      Byte count;

   public:
      BufferingExample()
         : Form()
      {
         array<String^>^tempStrings = {"Draw to Form without OptimizedDoubleBufferring control style","Draw to Form using OptimizedDoubleBuffering control style","Draw to HDC for form"};
         bufferingModeStrings = tempStrings;

         // Configure the Form for this example.
         this->Text = "User double buffering";
         this->MouseDown += gcnew MouseEventHandler( this, &BufferingExample::MouseDownHandler );
         this->Resize += gcnew EventHandler( this, &BufferingExample::OnResize );
         this->SetStyle( static_cast<ControlStyles>(ControlStyles::AllPaintingInWmPaint | ControlStyles::UserPaint), true );

         // Configure a timer to draw graphics updates.
         timer1 = gcnew System::Windows::Forms::Timer;
         timer1->Interval = 200;
         timer1->Tick += gcnew EventHandler( this, &BufferingExample::OnTimer );
         bufferingMode = 2;
         count = 0;

         // Retrieves the BufferedGraphicsContext for the 
         // current application domain.
         context = BufferedGraphicsManager::Current;

         // Sets the maximum size for the primary graphics buffer
         // of the buffered graphics context for the application
         // domain.  Any allocation requests for a buffer larger 
         // than this will create a temporary buffered graphics 
         // context to host the graphics buffer.
         context->MaximumBuffer = System::Drawing::Size( this->Width + 1, this->Height + 1 );

         // Allocates a graphics buffer the size of this form
         // using the pixel format of the Graphics created by 
         // the Form.CreateGraphics() method, which returns a 
         // Graphics object that matches the pixel format of the form.
         grafx = context->Allocate( this->CreateGraphics(), Rectangle(0,0,this->Width,this->Height) );

         // Draw the first frame to the buffer.
         DrawToBuffer( grafx->Graphics );
      }

   private:
      void MouseDownHandler( Object^ /*sender*/, MouseEventArgs^ e )
      {
         if ( e->Button == ::MouseButtons::Right )
         {
            // Cycle the buffering mode.
            if ( ++bufferingMode > 2 )
                        bufferingMode = 0;

            // If the previous buffering mode used 
            // the OptimizedDoubleBuffering ControlStyle,
            // disable the control style.
            if ( bufferingMode == 1 )
                        this->SetStyle( ControlStyles::OptimizedDoubleBuffer, true );

            // If the current buffering mode uses
            // the OptimizedDoubleBuffering ControlStyle,
            // enabke the control style.
            if ( bufferingMode == 2 )
                        this->SetStyle( ControlStyles::OptimizedDoubleBuffer, false );

            // Cause the background to be cleared and redraw.
            count = 6;
            DrawToBuffer( grafx->Graphics );
            this->Refresh();
         }
         else
         {
            
            // Toggle whether the redraw timer is active.
            if ( timer1->Enabled )
                        timer1->Stop();
            else
                        timer1->Start();
         }
      }

   private:
      void OnTimer( Object^ /*sender*/, EventArgs^ /*e*/ )
      {
         // Draw randomly positioned ellipses to the buffer.
         DrawToBuffer( grafx->Graphics );

         // If in bufferingMode 2, draw to the form's HDC.
         if ( bufferingMode == 2 )

         // Render the graphics buffer to the form's HDC.
         grafx->Render( Graphics::FromHwnd( this->Handle ) );
         // If in bufferingMode 0 or 1, draw in the paint method.
         else

         // If in bufferingMode 0 or 1, draw in the paint method.
         this->Refresh();
      }

      void OnResize( Object^ /*sender*/, EventArgs^ /*e*/ )
      {
         // Re-create the graphics buffer for a new window size.
         context->MaximumBuffer = System::Drawing::Size( this->Width + 1, this->Height + 1 );
         if ( grafx != nullptr )
         {
            delete grafx;
            grafx = nullptr;
         }

         grafx = context->Allocate( this->CreateGraphics(), Rectangle(0,0,this->Width,this->Height) );

         // Cause the background to be cleared and redraw.
         count = 6;
         DrawToBuffer( grafx->Graphics );
         this->Refresh();
      }

      void DrawToBuffer( Graphics^ g )
      {
         // Clear the graphics buffer every five updates.
         if ( ++count > 5 )
         {
            count = 0;
            grafx->Graphics->FillRectangle( Brushes::Black, 0, 0, this->Width, this->Height );
         }

         // Draw randomly positioned and colored ellipses.
         Random^ rnd = gcnew Random;
         for ( int i = 0; i < 20; i++ )
         {
            int px = rnd->Next( 20, this->Width - 40 );
            int py = rnd->Next( 20, this->Height - 40 );
            g->DrawEllipse( gcnew Pen( Color::FromArgb( rnd->Next( 0, 255 ), rnd->Next( 0, 255 ), rnd->Next( 0, 255 ) ), 1.0f ), px, py, px + rnd->Next( 0, this->Width - px - 20 ), py + rnd->Next( 0, this->Height - py - 20 ) );
         }

         // Draw information strings.
         g->DrawString( String::Format( "Buffering Mode: {0}", bufferingModeStrings[ bufferingMode ] ), gcnew System::Drawing::Font( "Arial",8 ), Brushes::White, 10, 10 );
         g->DrawString( "Right-click to cycle buffering mode", gcnew System::Drawing::Font( "Arial",8 ), Brushes::White, 10, 22 );
         g->DrawString( "Left-click to toggle timed display refresh", gcnew System::Drawing::Font( "Arial",8 ), Brushes::White, 10, 34 );
      }

   protected:
      virtual void OnPaint( PaintEventArgs^ e ) override
      {
         grafx->Render( e->Graphics );
      }
   };
}

[STAThread]
int main()
{
   Application::Run( gcnew BufferingExample::BufferingExample );
}
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;

namespace BufferingExample 
{
    public class BufferingExample : Form
    {
        private BufferedGraphicsContext context;
        private BufferedGraphics grafx;

	private byte bufferingMode;
	private string[] bufferingModeStrings = 
		{ "Draw to Form without OptimizedDoubleBufferring control style",
		  "Draw to Form using OptimizedDoubleBuffering control style",
		  "Draw to HDC for form" };

	private System.Windows.Forms.Timer timer1;
	private byte count;

        public BufferingExample() : base()
        {
            // Configure the Form for this example.
            this.Text = "User double buffering";
            this.MouseDown += new MouseEventHandler(this.MouseDownHandler);
            this.Resize += new EventHandler(this.OnResize);
            this.SetStyle( ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint, true );

            // Configure a timer to draw graphics updates.
	    timer1 = new System.Windows.Forms.Timer();
	    timer1.Interval = 200;
	    timer1.Tick += new EventHandler(this.OnTimer);

	    bufferingMode = 2;
	    count = 0;

            // Retrieves the BufferedGraphicsContext for the 
            // current application domain.
            context = BufferedGraphicsManager.Current;

            // Sets the maximum size for the primary graphics buffer
            // of the buffered graphics context for the application
            // domain.  Any allocation requests for a buffer larger 
            // than this will create a temporary buffered graphics 
            // context to host the graphics buffer.
            context.MaximumBuffer = new Size(this.Width+1, this.Height+1);

            // Allocates a graphics buffer the size of this form
            // using the pixel format of the Graphics created by 
            // the Form.CreateGraphics() method, which returns a 
            // Graphics object that matches the pixel format of the form.
            grafx = context.Allocate(this.CreateGraphics(), 
                 new Rectangle( 0, 0, this.Width, this.Height ));

	    // Draw the first frame to the buffer.
	    DrawToBuffer(grafx.Graphics);
        }

	private void MouseDownHandler(object sender, MouseEventArgs e)
        {
	    if( e.Button == MouseButtons.Right )
	    {
                 // Cycle the buffering mode.
	         if( ++bufferingMode > 2 )
                     bufferingMode = 0;

                 // If the previous buffering mode used 
                 // the OptimizedDoubleBuffering ControlStyle,
                 // disable the control style.
                 if( bufferingMode == 1 )
                     this.SetStyle( ControlStyles.OptimizedDoubleBuffer, true );

                 // If the current buffering mode uses
                 // the OptimizedDoubleBuffering ControlStyle,
                 // enabke the control style.
                 if( bufferingMode == 2 )
                     this.SetStyle( ControlStyles.OptimizedDoubleBuffer, false );

                 // Cause the background to be cleared and redraw.
                 count = 6;
    	         DrawToBuffer(grafx.Graphics);                 
		 this.Refresh();
	    }
	    else
	    {
                // Toggle whether the redraw timer is active.
		if( timer1.Enabled )
			timer1.Stop();
		else
			timer1.Start(); 
	    }
        }

	private void OnTimer(object sender, EventArgs e)
	{
            // Draw randomly positioned ellipses to the buffer.
	    DrawToBuffer(grafx.Graphics);

            // If in bufferingMode 2, draw to the form's HDC.
	    if( bufferingMode == 2 )            
                    // Render the graphics buffer to the form's HDC.
		    grafx.Render(Graphics.FromHwnd(this.Handle));            
            // If in bufferingMode 0 or 1, draw in the paint method.
	    else
  		    this.Refresh();
	}

        private void OnResize(object sender, EventArgs e)
        {
           // Re-create the graphics buffer for a new window size.
           context.MaximumBuffer = new Size(this.Width+1, this.Height+1);
           if( grafx != null )
           {
	       grafx.Dispose();
               grafx = null;               
           }
           grafx = context.Allocate(this.CreateGraphics(), 
               new Rectangle( 0, 0, this.Width, this.Height ));
           
           // Cause the background to be cleared and redraw.
           count = 6;
    	   DrawToBuffer(grafx.Graphics);                 
	   this.Refresh();
        }	

	private void DrawToBuffer(Graphics g)
	{
            // Clear the graphics buffer every five updates.
	    if( ++count > 5 )
            {
                count = 0;                
                grafx.Graphics.FillRectangle(Brushes.Black, 0, 0, this.Width, this.Height);
            }

            // Draw randomly positioned and colored ellipses.
	    Random rnd = new Random();
	    for( int i=0; i<20; i++ )
	    {
		int px = rnd.Next(20,this.Width-40);
		int py = rnd.Next(20,this.Height-40);
		g.DrawEllipse(new Pen(Color.FromArgb(rnd.Next(0, 255), rnd.Next(0,255), rnd.Next(0,255)), 1), 
			px, py, px+rnd.Next(0, this.Width-px-20), py+rnd.Next(0, this.Height-py-20)); 	    			
	    }

            // Draw information strings.
	    g.DrawString("Buffering Mode: "+bufferingModeStrings[bufferingMode], new Font("Arial", 8), Brushes.White, 10, 10);
            g.DrawString("Right-click to cycle buffering mode", new Font("Arial", 8), Brushes.White, 10, 22);
            g.DrawString("Left-click to toggle timed display refresh", new Font("Arial", 8), Brushes.White, 10, 34);
	}

	protected override void OnPaint(PaintEventArgs e)
        {            
	    grafx.Render(e.Graphics);
	}

        [STAThread]
        public static void Main(string[] args)
        {
	    Application.Run(new BufferingExample());
        }
    }
}
Imports System.ComponentModel
Imports System.Drawing
Imports System.Windows.Forms

Public Class BufferingExample
    Inherits Form
    Private context As BufferedGraphicsContext
    Private grafx As BufferedGraphics
    
    Private bufferingMode As Byte
    Private bufferingModeStrings As String() = _
        {"Draw to Form without OptimizedDoubleBufferring control style", _
         "Draw to Form using OptimizedDoubleBuffering control style", _
         "Draw to HDC for form"}
    
    Private timer1 As System.Windows.Forms.Timer
    Private count As Byte    
    
    Public Sub New()
        ' Configure the Form for this example.
        Me.Text = "User double buffering"
        AddHandler Me.MouseDown, AddressOf Me.MouseDownHandler
        AddHandler Me.Resize, AddressOf Me.ResizeHandler
        Me.SetStyle(ControlStyles.AllPaintingInWmPaint Or ControlStyles.UserPaint, True)
        
        ' Configure a timer to draw graphics updates.
        timer1 = New System.Windows.Forms.Timer()
        timer1.Interval = 200
        AddHandler timer1.Tick, AddressOf Me.OnTimer
        
        bufferingMode = 2
        count = 0
        
        ' Retrieves the BufferedGraphicsContext for the 
        ' current application domain.
        context = BufferedGraphicsManager.Current
        
        ' Sets the maximum size for the primary graphics buffer
        ' of the buffered graphics context for the application
        ' domain.  Any allocation requests for a buffer larger 
        ' than this will create a temporary buffered graphics 
        ' context to host the graphics buffer.
        context.MaximumBuffer = New Size(Me.Width + 1, Me.Height + 1)
        
        ' Allocates a graphics buffer the size of this form
        ' using the pixel format of the Graphics created by 
        ' the Form.CreateGraphics() method, which returns a 
        ' Graphics object that matches the pixel format of the form.
        grafx = context.Allocate(Me.CreateGraphics(), _
            New Rectangle(0, 0, Me.Width, Me.Height))
        
        ' Draw the first frame to the buffer.
        DrawToBuffer(grafx.Graphics)
    End Sub    
    
    Private Sub MouseDownHandler(sender As Object, e As MouseEventArgs)
        If e.Button = MouseButtons.Right Then
            ' Cycle the buffering mode.
            bufferingMode = bufferingMode+1
            If bufferingMode > 2 Then
                bufferingMode = 0
            End If 
            ' If the previous buffering mode used 
            ' the OptimizedDoubleBuffering ControlStyle,
            ' disable the control style.
            If bufferingMode = 1 Then
                Me.SetStyle(ControlStyles.OptimizedDoubleBuffer, True)
            End If 
            ' If the current buffering mode uses
            ' the OptimizedDoubleBuffering ControlStyle,
            ' enabke the control style.
            If bufferingMode = 2 Then
                Me.SetStyle(ControlStyles.OptimizedDoubleBuffer, False)
            End If 
            ' Cause the background to be cleared and redraw.
            count = 6
            DrawToBuffer(grafx.Graphics)
            Me.Refresh()
        Else
            ' Toggle whether the redraw timer is active.
            If timer1.Enabled Then
                timer1.Stop()
            Else
                timer1.Start()
            End If
        End If
    End Sub
     
    Private Sub OnTimer(sender As Object, e As EventArgs)
        ' Draw randomly positioned ellipses to the buffer.
        DrawToBuffer(grafx.Graphics)
        
        ' If in bufferingMode 2, draw to the form's HDC.
        If bufferingMode = 2 Then
            ' Render the graphics buffer to the form's HDC.
            grafx.Render(Graphics.FromHwnd(Me.Handle))
        ' If in bufferingMode 0 or 1, draw in the paint method.
        Else
            Me.Refresh()
        End If
    End Sub
     
    Private Sub ResizeHandler(sender As Object, e As EventArgs)
        ' Re-create the graphics buffer for a new window size.
        context.MaximumBuffer = New Size(Me.Width + 1, Me.Height + 1)
        If (grafx IsNot Nothing) Then
            grafx.Dispose()
            grafx = Nothing
        End If
        grafx = context.Allocate(Me.CreateGraphics(), New Rectangle(0, 0, Me.Width, Me.Height))
        
        ' Cause the background to be cleared and redraw.
        count = 6
        DrawToBuffer(grafx.Graphics)
        Me.Refresh()
    End Sub    
    
    Private Sub DrawToBuffer(g As Graphics)
        ' Clear the graphics buffer every five updates.
        count = count+1
        If count > 5 Then
            count = 0
            grafx.Graphics.FillRectangle(Brushes.Black, 0, 0, Me.Width, Me.Height)
        End If
        
        ' Draw randomly positioned and colored ellipses.
        Dim rnd As New Random()
        Dim i As Integer
        For i = 0 To 21
            Dim px As Integer = rnd.Next(20, Me.Width - 40)
            Dim py As Integer = rnd.Next(20, Me.Height - 40)
            g.DrawEllipse(New Pen(Color.FromArgb(rnd.Next(0, 255), rnd.Next(0, 255), _
                rnd.Next(0, 255)), 1), px, py, px + rnd.Next(0, Me.Width - px - 20), _
                py + rnd.Next(0, Me.Height - py - 20))
        Next i
        
        ' Draw information strings.
        g.DrawString("Buffering Mode: " + bufferingModeStrings(bufferingMode), _
            New Font("Arial", 8), Brushes.White, 10, 10)
        g.DrawString("Right-click to cycle buffering mode", New Font("Arial", 8), _
            Brushes.White, 10, 22)
        g.DrawString("Left-click to toggle timed display refresh", _
            New Font("Arial", 8), Brushes.White, 10, 34)
    End Sub    
    
    Protected Overrides Sub OnPaint(e As PaintEventArgs)
        grafx.Render(e.Graphics)
    End Sub   
    
    <STAThread()>  _
    Public Shared Sub Main(args() As String)
        Application.Run(New BufferingExample())
    End Sub

End Class

설명

BufferedGraphics 클래스를 사용 하면 그래픽에 대 한 사용자 지정 이중 버퍼링을 구현할 수 있습니다.The BufferedGraphics class allows you to implement custom double buffering for your graphics. 그래픽 버퍼를 버퍼에 쓰고 출력 디바이스에 해당 내용을 렌더링 하는 데 사용할 수 있는 메서드와 함께 래퍼를 제공 합니다.It provides a wrapper for a graphics buffer, along with methods that you can use to write to the buffer and render its contents to an output device.

이중 버퍼링을 사용 하는 그래픽을 줄이거나 없앨 표시 화면을 그려서 발생 하는 깜박임을 수 있습니다.Graphics that use double buffering can reduce or eliminate flicker that is caused by redrawing a display surface. 이중 버퍼링을 사용 하면 업데이트 된 그래픽 메모리에 버퍼에 먼저 그려집니다 하 고이 버퍼의 내용을 표시 화면 중 일부나 전부를 신속 하 게 기록 다음 됩니다.When you use double buffering, updated graphics are first drawn to a buffer in memory, and the contents of this buffer are then quickly written to some or all of the displayed surface. 표시 된 그래픽이 비교적 간단 하 게 덮어쓰는 일반적으로 줄이거나 경우에 따라 그래픽 업데이트 될 때 발생 하는 깜박임을 제거 합니다.This relatively brief overwrite of the displayed graphics typically reduces or eliminates the flicker that sometimes occurs when graphics are updated.

참고

이중 버퍼링을 사용 하는 가장 간단한 방법은 설정 하는 것은 OptimizedDoubleBuffer 컨트롤 스타일 플래그를 사용 하 여 컨트롤을는 SetStyle 메서드.The simplest way to use double buffering is to set the OptimizedDoubleBuffer control style flag on a control using the SetStyle method. 설정 된 OptimizedDoubleBuffer 컨트롤 코드를 추가 하지 않고도 기본 그래픽 버퍼를 통해 컨트롤에 대 한 모든 그리기 작업을 리디렉션할에 대 한 플래그입니다.Setting the OptimizedDoubleBuffer flag for a control redirects all painting for the control through a default graphics buffer, without requiring any additional code. 이 플래그를로 true 기본적으로 합니다.This flag is set to true by default.

합니다 BufferedGraphics 클래스 생성자가 없는 공용 및 만들어야 합니다 BufferedGraphicsContext 사용 하 여 애플리케이션 도메인에 대 한 해당 Allocate 메서드.The BufferedGraphics class has no public constructor and must be created by the BufferedGraphicsContext for an application domain using its Allocate method. 검색할 수 있습니다 합니다 BufferedGraphicsContext 정적에서 현재 애플리케이션 도메인에 대 한 BufferedGraphicsManager.Current 속성입니다.You can retrieve the BufferedGraphicsContext for the current application domain from the static BufferedGraphicsManager.Current property.

Graphics 그래픽 버퍼에 그리기에 대 한 속성을 사용할 수 있습니다.The Graphics property can be used for drawing to the graphics buffer. 이 속성에 대 한 액세스를 제공 합니다 Graphics 이 할당 된 그래픽 버퍼를 그릴 수 있는 개체 BufferedGraphics 개체입니다.This property provides access to the Graphics object that draws to the graphics buffer allocated for this BufferedGraphics object.

Render 화면에 그래픽의 내용을 버퍼 인수 그립니다 없는 메서드는 버퍼를 할당할 때 지정 합니다.The Render method with no arguments draws the contents of the graphics buffer to the surface specified when the buffer was allocated. 다른 오버 로드는 Render 메서드를 사용 하면 지정 하는 Graphics 개체 또는 IntPtr 그래픽 버퍼의 내용을 그리는를 디바이스 컨텍스트를 가리키는 개체입니다.Other overloads of the Render method allow you to specify a Graphics object or an IntPtr object that points to a device context to which to draw the contents of the graphics buffer.

이중 버퍼링 된 그래픽을 그리는 방법에 대 한 자세한 내용은 참조 하세요. 이중 버퍼링 그래픽합니다.For more information about drawing double-buffered graphics, see Double Buffered Graphics.

속성

Graphics Graphics Graphics Graphics

그래픽 버퍼에 출력하는 Graphics 개체를 가져옵니다.Gets a Graphics object that outputs to the graphics buffer.

메서드

Dispose() Dispose() Dispose() Dispose()

해당 BufferedGraphics 개체에서 사용하는 리소스를 모두 해제합니다.Releases all resources used by the BufferedGraphics object.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

지정한 개체와 현재 개체가 같은지 여부를 확인합니다.Determines whether the specified object is equal to the current object.

(Inherited from Object)
Finalize() Finalize() Finalize() Finalize()

가비지 컬렉션이 회수하기 전에 개체가 리소스를 해제하고 다른 정리 작업을 수행할 수 있게 합니다.Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

기본 해시 함수로 작동합니다.Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

현재 인스턴스의 Type을 가져옵니다.Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.Creates a shallow copy of the current Object.

(Inherited from Object)
Render() Render() Render() Render()

그래픽 버퍼의 내용을 기본 디바이스에 씁니다.Writes the contents of the graphics buffer to the default device.

Render(Graphics) Render(Graphics) Render(Graphics) Render(Graphics)

그래픽 버퍼의 내용을 지정된 Graphics 개체에 씁니다.Writes the contents of the graphics buffer to the specified Graphics object.

Render(IntPtr) Render(IntPtr) Render(IntPtr) Render(IntPtr)

그래픽 버퍼의 내용을 지정된 IntPtr 핸들과 연결된 디바이스 컨텍스트에 씁니다.Writes the contents of the graphics buffer to the device context associated with the specified IntPtr handle.

ToString() ToString() ToString() ToString()

현재 개체를 나타내는 문자열을 반환합니다.Returns a string that represents the current object.

(Inherited from Object)

적용 대상

스레드 보안

BufferedGraphics 클래스는 스레드로부터 안전하지 않습니다.The BufferedGraphics class is not thread safe. 그래픽 버퍼를 별도 스레드에서 액세스할 때 충돌을 방지 하려면 스레드 액세스 제어 메커니즘을 사용 하는 것이 반드시 합니다.When accessing a graphics buffer from separate threads, it is important to use a thread-access control mechanism to prevent conflicts.

추가 정보