# PointsToPixels

> Converts a position from point to pixel space.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.7/script-reference/unityeditor.md)
* **Assembly:** UnityEditor.CoreModule

## PointsToPixels(Rect)

Converts a position from point to pixel space.

```csharp
public static Rect PointsToPixels(Rect rect)
```

### Parameters

**** (\[Rect]\(/engine/6000.7/script-reference/unityengine/rect)): A GUI position in point space.

### Returns

| Type                                                        | Description                       |
| ----------------------------------------------------------- | --------------------------------- |
| [Rect](/engine/6000.7/script-reference/unityengine/rect.md) | The same position in pixel space. |

### Remarks

Convert from point space to pixel space.

Use this for determining the resolution and positioning of custom GUI content, such as render textures.

Additional Resources: [EditorGUIUtility.PixelsToPoints](/engine/6000.7/script-reference/unityeditor/editorguiutility/pixelstopoints.md), [EditorGUIUtility.pixelsPerPoint](/engine/6000.7/script-reference/unityeditor/editorguiutility/pixelsperpoint.md).

## PointsToPixels(Vector2)

Convert a Rect from point space to pixel space.

```csharp
public static Vector2 PointsToPixels(Vector2 position)
```

### Parameters

**** (\[Vector2]\(/engine/6000.7/script-reference/unityengine/vector2)): A GUI rect measured in points.

### Returns

| Type                                                              | Description                                  |
| ----------------------------------------------------------------- | -------------------------------------------- |
| [Vector2](/engine/6000.7/script-reference/unityengine/vector2.md) | A rect representing the same area in pixels. |
