## DrawRectangle(Pen, int, int, int, int) {#drawrectangle}

座標ペア、幅、高さで指定された長方形を描画します。

```csharp
public void DrawRectangle(Pen pen, int x, int y, int width, int height)
```

| パラメータ | タイプ | 説明 |
| --- | --- | --- |
| pen | Pen | 四角形の色、幅、およびスタイルを決定するペン。 |
| x | Int32 | 描画する四角形の左上隅の x 座標。 |
| y | Int32 | 描画する四角形の左上隅の y 座標。 |
| width | Int32 | 描画する四角形の幅。 |
| height | Int32 | 描画する四角形の高さ。 |

### 関連項目

* class [Pen](../../pen/)
* class [Graphics](../)
* 名前空間 [System.Drawing](../../graphics/)
* 組み立て [Aspose.Drawing](../../../)

---

## DrawRectangle(Pen, Rectangle) {#drawrectangle_2}

Rectangle 構造体で指定された四角形を描画します。

```csharp
public void DrawRectangle(Pen pen, Rectangle rect)
```

| パラメータ | タイプ | 説明 |
| --- | --- | --- |
| pen | Pen | 四角形の色、幅、およびスタイルを決定する Pen。 |
| rect | Rectangle | 描画する四角形を表す Rectangle 構造体。 |

### 関連項目

* class [Pen](../../pen/)
* struct [Rectangle](../../rectangle/)
* class [Graphics](../)
* 名前空間 [System.Drawing](../../graphics/)
* 組み立て [Aspose.Drawing](../../../)

---

## DrawRectangle(Pen, float, float, float, float) {#drawrectangle_1}

座標ペア、幅、高さで指定された長方形を描画します。

```csharp
public void DrawRectangle(Pen pen, float x, float y, float width, float height)
```

| パラメータ | タイプ | 説明 |
| --- | --- | --- |
| pen | Pen | 四角形の色、幅、およびスタイルを決定する Pen。 |
| x | Single | 描画する四角形の左上隅の x 座標。 |
| y | Single | 描画する四角形の左上隅の y 座標。 |
| width | Single | 描画する四角形の幅。 |
| height | Single | 描画する四角形の高さ。 |

### 関連項目

* class [Pen](../../pen/)
* class [Graphics](../)
* 名前空間 [System.Drawing](../../graphics/)
* 組み立て [Aspose.Drawing](../../../)


