ActivityDesignerPaint.GetRoundedRectanglePath(Rectangle, Int32) 方法

定義

傳回用來繪製指定之圓角矩形的圖形路徑。Returns the graphics path used to draw the specified rounded rectangle.

public:
 static System::Drawing::Drawing2D::GraphicsPath ^ GetRoundedRectanglePath(System::Drawing::Rectangle rectangle, int radius);
public static System.Drawing.Drawing2D.GraphicsPath GetRoundedRectanglePath (System.Drawing.Rectangle rectangle, int radius);
static member GetRoundedRectanglePath : System.Drawing.Rectangle * int -> System.Drawing.Drawing2D.GraphicsPath
Public Shared Function GetRoundedRectanglePath (rectangle As Rectangle, radius As Integer) As GraphicsPath

參數

rectangle
Rectangle

Rectangle,為其取得圖形路徑。The Rectangle for which to obtain the graphics path.

radius
Int32

整數,定義用來繪製圓弧角的半徑。An integer that defines the radius to use to draw the rounded corners.

傳回

GraphicsPath,繪製指定矩形的圓角路徑。A GraphicsPath that draws the rounded path of the specified rectangle.

例外狀況

rectangle 設定為 IsEmptyrectangle is set to IsEmpty.

-或--or- radius 小於或等於 0。radius is less than or equal to 0.

備註

DrawRoundedRectangle 方法會使用 GetRoundedRectanglePath 來取得要繪製的路徑。The DrawRoundedRectangle method uses GetRoundedRectanglePath to obtain the path to draw.

適用於