Graphics::FillPie(constBrush*,INT,INT,INT,REAL,REAL) メソッド (gdiplusgraphics.h)

Graphics::FillPie メソッドは、ブラシを使用して円の内部を塗りつぶします。

構文

Status FillPie(
  [in] const Brush *brush,
  [in] INT         x,
  [in] INT         y,
  [in] INT         width,
  [in] INT         height,
  [in] REAL        startAngle,
  [in] REAL        sweepAngle
);

パラメーター

[in] brush

型: const Brush*

円グラフの内部を描画するために使用される Brush オブジェクトへのポインター。

[in] x

型: INT

楕円を囲む四角形の左上隅の x 座標を指定する整数。 楕円の曲線部分は円の円弧です。

[in] y

型: INT

楕円を囲む四角形の左上隅の y 座標を指定する整数。

[in] width

型: INT

楕円を囲む四角形の幅を指定する整数。

[in] height

型: INT

楕円を囲む四角形の高さを指定する整数。

[in] startAngle

種類: REAL

x 軸と円の円弧の始点との間の角度を度単位で指定する実数。

[in] sweepAngle

種類: REAL

円の円弧の始点と終点の間の角度を度単位で指定する実数。

戻り値

種類: 状態

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

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

注釈

円は楕円の内部の一部です (楕円曲線と 2 つの放射状線で囲まれます)。 startAnglesweepAngle は、使用する楕円の部分を指定します。

次の例では、円を定義し、その円を塗りつぶします。

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

   // Create a SolidBrush object.
   SolidBrush blackBrush(Color(255, 0, 0, 0));

   // Define the pie shape.
   int x = 0;
   int y = 0;
   int width = 200;
   int height = 100;
   REAL startAngle = 0.0f;
   REAL sweepAngle = 45.0f;

   // Fill the pie.
   graphics.FillPie(&blackBrush, x, y, width, height, startAngle, sweepAngle);
}

要件

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

こちらもご覧ください

Color

グラフィックス

状態