> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# FRRectangle オブジェクトの SetRectangle メソッド

> ABBYY FineReader Engine API の FRRectangle オブジェクトの SetRectangle メソッド — Left、Top、Width、Height を使用して、Rectangle の位置とサイズを設定します。

このメソッドを使用すると、Rectangle の位置とサイズを設定できます。"

<div id="syntax">
  ## 構文
</div>

<div id="c">
  ### C++
</div>

```cpp theme={null}
HRESULT SetRectangle(
  int Left,
  int Top,
  int Width,
  int Height
);
```

### C\#

```csharp theme={null}
void SetRectangle(
  int Left,
  int Top,
  int Width,
  int Height
);
```

<div id="visual-basic-net">
  ### Visual Basic .NET
</div>

```vb theme={null}
Sub SetRectangle( _
  Left As Integer, _
  Top As Integer, _
  Width As Integer, _
  Height As Integer _
)
```

<div id="parameters">
  ## パラメーター
</div>

Left

\[in] このパラメーターは、Rectangle の左端の座標を指定します。

Top

\[in] このパラメーターは、Rectangle の上端の座標を指定します。

Width

\[in] このパラメーターは、Rectangle の幅を指定します。

Height

\[in] このパラメーターは、Rectangle の高さを指定します。

<div id="return-values">
  ## 戻り値
</div>

このメソッドに固有の戻り値はありません。返されるのは、[ABBYY FineReader Engine 関数の標準の戻り値](/ja/fine-reader/engine/api-reference/return-codes)です。

<div id="remarks">
  ## 注記
</div>

[SetRectangleFromLTRB](/ja/fine-reader/engine/api-reference/supplementary-objects-and-methods/frrectangle/setrectanglefromltrb-method) メソッドを使用して、Rectangle の位置とサイズを設定することもできます。このメソッドではすべての座標を指定でき、設定後のRectangle の幅と高さは内部的に計算されます。

<div id="see-also">
  ## 関連項目
</div>

[FRRectangle](/ja/fine-reader/engine/api-reference/supplementary-objects-and-methods/frrectangle)
