Graphics::D rawPie(constPen*,constRect&,REAL,REAL) メソッド (gdiplusgraphics.h)

Graphics::D rawPie メソッドは円を描画します。

構文

Status DrawPie(
  [in]      const Pen    *pen,
  [in, ref] const Rect & rect,
  [in]      REAL         startAngle,
  [in]      REAL         sweepAngle
);

パラメーター

[in] pen

種類: const Pen*

円グラフの描画に使用するペンへのポインター。

[in, ref] rect

型: const Rect

円を描画する楕円を囲む四角形への参照。

[in] startAngle

種類: REAL

x 軸と円グラフを定義する円弧の始点との間の角度を度単位で指定する実数。 正の値は時計回りの回転を指定します。

[in] sweepAngle

種類: REAL

円グラフを定義する円弧の始点と終点の間の角度を度単位で指定する実数。 正の値は時計回りの回転を指定します。

戻り値

種類: 状態

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

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

注釈

次の図は、四角形で囲まれた楕円に描画される円を示しています。 図には、楕円の横軸と startAngle と sweepAngle の方向も示 されています

円の輪郭が描いた楕円を示す図。開始角度とスイープ角度にラベルが付けられます

次の例では、円を描画します。


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

   // Create a Pen object.
   Pen blackPen(Color(255, 0, 0, 0), 3);

   // Define the pie.
   Rect ellipseRect(0, 0, 200, 100);
   REAL startAngle = 0.0f;
   REAL sweepAngle = 45.0f;

   // Draw the pie.
   graphics.DrawPie(&blackPen, ellipseRect, startAngle, sweepAngle);
}

要件

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

こちらもご覧ください

DrawLines メソッド

FillPie メソッド

グラフィックス

開いた曲線と閉じた曲線

Rect