## Graphics::DrawRectangle(const SharedPtr\<Pen\>\&, float, float, float, float) method


現在のオブジェクトが表すサーフェス上に、指定されたペンを使用して指定された矩形を描画します。

```cpp
void System::Drawing::Graphics::DrawRectangle(const SharedPtr<Pen> &pen, float x, float y, float width, float height)
```


| パラメーター | 型 | 説明 |
| --- | --- | --- |
| ペン | const SharedPtr\<Pen\>\& | 矩形を描画するときに使用するペン |
| x | 単精度浮動小数点数 | 描画する矩形の左上隅の X 座標 |
| y | 単精度浮動小数点数 | 描画する矩形の左上隅の Y 座標 |
| width | 単精度浮動小数点数 | 描画する矩形の幅 |
| height | 単精度浮動小数点数 | 描画する矩形の高さ |

## 参照

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [Pen](../../pen/)
* Class [Graphics](../)
* Namespace [System::Drawing](../../)
* Library [Aspose.Page for C++](../../../)
## Graphics::DrawRectangle(const SharedPtr\<Pen\>\&, int, int, int, int) method


現在のオブジェクトが表すサーフェス上に、指定されたペンを使用して指定された矩形を描画します。

```cpp
void System::Drawing::Graphics::DrawRectangle(const SharedPtr<Pen> &pen, int x, int y, int width, int height)
```


| パラメーター | 型 | 説明 |
| --- | --- | --- |
| ペン | const SharedPtr\<Pen\>\& | 矩形を描画するときに使用するペン |
| x | int | 描画する矩形の左上隅の X 座標 |
| y | int | 描画する矩形の左上隅の Y 座標 |
| width | int | 描画する矩形の幅 |
| height | int | 描画する矩形の高さ |

## 参照

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [Pen](../../pen/)
* Class [Graphics](../)
* Namespace [System::Drawing](../../)
* Library [Aspose.Page for C++](../../../)
## Graphics::DrawRectangle(const SharedPtr\<Pen\>\&, Rectangle) method


現在のオブジェクトが表すサーフェス上に、指定されたペンを使用して指定された矩形を描画します。

```cpp
void System::Drawing::Graphics::DrawRectangle(const SharedPtr<Pen> &pen, Rectangle rect)
```


| パラメーター | 型 | 説明 |
| --- | --- | --- |
| ペン | const SharedPtr\<Pen\>\& | 矩形を描画するときに使用するペン |
| rect | Rectangle | 描画する矩形の位置とサイズを指定する [Rectangle](../../rectangle/) オブジェクト |

## 参照

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [Pen](../../pen/)
* Class [Rectangle](../../rectangle/)
* Class [Graphics](../)
* Namespace [System::Drawing](../../)
* Library [Aspose.Page for C++](../../../)
