# shapeGeometry Function

> shapeGeometry function in the TX Sheet Control JavaScript API for the browser, with the return type ShapeGeometry and a JavaScript example.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Function
- **Path:** TX Sheet Control > API Reference > JavaScript API > Browser Editor > shapeGeometry Function
- **403 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/shapegeometry-function/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/shapegeometry-function/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/shapegeometry-function/llms-full.txt

---

Public function for shapeGeometry.

Package: `@txtextcontrol/tx-sheet-control`. Version: **2.0.0**.

ES module import: `import { shapeGeometry } from '@txtextcontrol/tx-sheet-control';`.

### Syntax

```javascript
shapeGeometry(preset, w, h, adjustments)
```

### Parameters

| Parameter | Type | Optional | Description |
|---|---|---|---|
| `preset` | `string` | No | Value matching preset's declared type and the owning object's validation rules. |
| `w` | `number` | No | Value matching w's declared type and the owning object's validation rules. |
| `h` | `number` | No | Value matching h's declared type and the owning object's validation rules. |
| `adjustments` | `Record<string, number> \| undefined` | Yes | Value matching adjustments's declared type and the owning object's validation rules. |

### Return Value

`ShapeGeometry`.

### Examples

Use this public value with the application package shown below. File and font inputs are application-owned resources, not automatically downloaded product data.

```javascript
import { shapeGeometry } from '@txtextcontrol/tx-sheet-control';

const result = shapeGeometry('Invoice', 2, 2);
console.log(result);
```

### See Also

- [JavaScript Browser Editor API](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/llms-full.txt)
- [Pictures and Shapes](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/pictures-shapes/llms-full.txt)

---

## Nearby

- **Previous:** [registerLanguage Function](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/registerlanguage-function/llms-full.txt)
- **Next:** [SHAPE_TYPES Constant](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/shape-types-constant/llms-full.txt)
