TextureBrush::ResetTransform メソッド (gdiplusbrush.h)

TextureBrush::ResetTransform メソッドは、このテクスチャ ブラシの変換マトリックスを ID マトリックスにリセットします。 これは、変換が行われないことを意味します。

構文

Status ResetTransform();

戻り値

種類: 状態

メソッドが成功した場合は、Status 列挙体の要素である Ok を返します

メソッドが失敗した場合は、 Status 列挙体の他の要素のいずれかを返します。

注釈

変換マトリックスを ID マトリックスに設定すると、変換が行われなくなります。 このメソッドは、多くの場合、変換に対して調整 (スケーリング、回転など) を行う前に変換をリセットするために使用されます。

次の例では、テクスチャ ブラシを作成し、ブラシの変換を設定します。 次に、変換されたブラシを使用して四角形を塗りつぶします。 次に、コードはブラシの変換をリセットし、変換されていないブラシを使用して四角形を塗りつぶします。

VOID Example_ResetTransform(HDC hdc)
{
   Graphics graphics(hdc);

   // Create a texture brush, and set its transformation.
   Image image(L"HouseAndTree.Gif");
   TextureBrush textureBrush(&image);
   textureBrush.RotateTransform(30);

   // Fill a rectangle with the transformed texture brush.
   graphics.FillRectangle(&textureBrush, 0, 0, 200, 100);

   textureBrush.ResetTransform();
   
   // Fill a rectangle with the texture brush (no transformation).
   graphics.FillRectangle(&textureBrush, 250, 0, 200, 100);
}

要件

要件
サポートされている最小のクライアント Windows XP、Windows 2000 Professional [デスクトップ アプリのみ]
サポートされている最小のサーバー Windows 2000 Server [デスクトップ アプリのみ]
対象プラットフォーム Windows
ヘッダー gdiplusbrush.h (Gdiplus.h を含む)
Library Gdiplus.lib
[DLL] Gdiplus.dll

こちらもご覧ください

ブラシと図形の塗りつぶし

座標系と変換

イメージ テクスチャを使用して図形を塗りつぶす

Image

マトリックス

MatrixOrder

Texturebrush

TextureBrush::GetTransform

TextureBrush::MultiplyTransform

TextureBrush::RotateTransform

TextureBrush::ScaleTransform

TextureBrush::SetTransform

TextureBrush::TranslateTransform

変換