<div class="meta" robots="noindex">

</div>

Property

# Graphics.PenWidth

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2019r2. Please use `Graphics.PenSize<graphics.pensize>` as a replacement.

</div>

## Description

The width in points used when drawing lines, ovals and rectangles.

## Sample code

This example sets the <span class="title-ref">PenWidth</span> to 5 and the PenHeight to 1 point:

``` xojo
g.PenHeight = 1.0
g.PenWidth = 5
g.DrawRect(150, 10, 100, 100)
```

## Compatibility

All project types on all supported operating systems.
