CustomLineCap::GetStrokeJoin メソッド (gdiplusheaders.h)

CustomLineCap::GetStrokeJoin メソッドは、同じ GraphicsPath オブジェクト内の複数の行を結合するために使用される LineJoin のスタイルを返します。

構文

LineJoin GetStrokeJoin();

戻り値

種類: LineJoin

このメソッドは、線結合のスタイルを返します。

解説

CustomLineCap オブジェクトは、パスとストロークを使用して終了キャップを定義します。 ストロークは GraphicsPath オブジェクトに含まれており、複数の図形を含めることができます。 GraphicsPath オブジェクトに複数の図形がある場合、ストローク結合によって、ジョイントのグラフィック表示方法が決まります。

次の例では、ストローク結合を使用して CustomLineCap オブジェクトを作成します。 次に、ストローク結合を取得し、 Pen オブジェクトの線結合として割り当て、線の描画に使用します。

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

   //Create a Path, and add two lines to it.
   Point points[3] = {Point(-15, -15), Point(0, 0), Point(15, -15)};
   GraphicsPath capPath;
   capPath.AddLines(points, 3);

   // Create a CustomLineCap object.
   CustomLineCap custCap(NULL, &capPath); 
  
   // Set the stroke join for custCap.
   custCap.SetStrokeJoin(LineJoinBevel);

   // Get the stroke join from custCap.
   LineJoin strokeJoin = custCap.GetStrokeJoin();
  
   // Create a Pen object, assign strokeJoin as the line join, and draw two
   // joined lines in a path.
   Pen strokeJoinPen(Color(255, 255, 0, 0), 15.1f);
   strokeJoinPen.SetLineJoin(strokeJoin);
   GraphicsPath joinPath;
   joinPath.AddLine(Point(10, 10), Point(10, 200));
   joinPath.AddLine(Point(10, 200), Point(200, 200));
   graphics.DrawPath(&strokeJoinPen, &joinPath);
}

要件

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

関連項目

CustomLineCap

Linecap

LineJoin