BufferedGraphicsContext クラス
アセンブリ: System.Drawing (system.drawing.dll 内)

Public NotInheritable Class BufferedGraphicsContext Implements IDisposable
public sealed class BufferedGraphicsContext : IDisposable
public final class BufferedGraphicsContext implements IDisposable
public final class BufferedGraphicsContext implements IDisposable

BufferedGraphicsContext クラスでは、グラフィックスのカスタム ダブル バッファリングを実装できます。グラフィックスでダブル バッファリングを使用すると、表示面の再描画によって引き起こされるちらつきを低減または除去できます。
![]() |
---|
ダブル バッファリングを使用する簡単な方法は、SetStyle メソッドを使用して、コントロールの OptimizedDoubleBuffer コントロール スタイル フラグを設定することです。コントロールの OptimizedDoubleBuffer コントロール スタイル フラグを設定すると、コードを追加することなしに、そのコントロールに関するすべての描画が既定のグラフィックス バッファにリダイレクトされます。既定では、このフラグは true に設定されています。 |
BufferedGraphicsContext クラスは、グラフィックス バッファを作成および構成するためのメソッドを提供します。Allocate メソッドは、BufferedGraphics を作成します。これは、バッファに書き込みを行ったりその内容を出力デバイスに描画したりするために使用できるメソッドを提供する、グラフィックス バッファのラッパーです。
静的 BufferedGraphicsManager.Current プロパティから現在のアプリケーション ドメインの BufferedGraphicsContext を取得できます。グラフィックスが多用されるアニメーションなどのアプリケーションでは、コンストラクタを使用して専用の BufferedGraphicsContext を作成できますが、ほとんどのアプリケーションでは BufferedGraphicsManager.Current プロパティで十分です。
バッファ内グラフィックスを描画する方法およびカスタムのバッファリング実装の詳細については、「ダブル バッファリングされたグラフィックス」および「方法 : バッファリングされたグラフィックスを手動で管理する」を参照してください。

現在のアプリケーション ドメインの BufferedGraphicsContext を取得する方法を次のコード例に示します。このコードは、BufferedGraphics クラスのトピックで取り上げているコード例の一部分です。
' Retrieves the BufferedGraphicsContext for the ' current application domain. Dim appDomainGraphicsContext As BufferedGraphicsContext = BufferedGraphicsManager.Current
// Retrieves the BufferedGraphicsContext for the // current application domain. BufferedGraphicsContext appDomainGraphicsContext = BufferedGraphicsManager.Current;
// Retrieves the BufferedGraphicsContext for the // current application domain. BufferedGraphicsContext^ appDomainGraphicsContext = BufferedGraphicsManager::Current;

System.Drawing.BufferedGraphicsContext


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


BufferedGraphicsContext メンバ
System.Drawing 名前空間
BufferedGraphics クラス
BufferedGraphicsManager
OptimizedDoubleBuffer
その他の技術情報
ダブル バッファリングされたグラフィックス
- BufferedGraphicsContext クラスのページへのリンク