# Screen

### capture

```python
def capture(self, x1: int, y1: int, x2: int, y2: int) -> np.ndarray:
```

<table><thead><tr><th width="127">Название</th><th width="92">Тип</th><th>Описание</th></tr></thead><tbody><tr><td>x1, y1</td><td>int, int</td><td>Координаты верхнего левого угла</td></tr><tr><td>x2, y2</td><td>int, int</td><td>Координаты нижнего правого угла</td></tr></tbody></table>

### capture\_fast

```python
def capture_fast(self, x1: int, y1: int, x2: int, y2: int) -> Union[np.ndarray, None]:
```

<table><thead><tr><th width="127">Название</th><th width="92">Тип</th><th>Описание</th></tr></thead><tbody><tr><td>x1, y1</td><td>int, int</td><td>Координаты верхнего левого угла</td></tr><tr><td>x2, y2</td><td>int, int</td><td>Координаты нижнего правого угла</td></tr></tbody></table>

{% hint style="warning" %}
Если нового изображения нет, возвращает None, не замораживает текущий поток если нет кадра.
{% endhint %}

* **`size -> Tuple[int, int]`**: Возвращает текущий размер экрана.
* **`hz -> int`**: Возвращает текущую частоту обновления экрана.

### capture\_multiple

```python
def capture_multiple(self, regions: List[Tuple[int, int, int, int]]) -> List[np.ndarray]:
```

<table><thead><tr><th width="127">Название</th><th width="92">Тип</th><th>Описание</th></tr></thead><tbody><tr><td>regions</td><td>List</td><td>Координаты [(x1, y1, x2, y2), (...), ..]</td></tr></tbody></table>

### capture\_multiple

```python
def capture_multiple_fast(self, regions: List[Tuple[int, int, int, int]]) -> Union[List[np.ndarray], None]:
```

<table><thead><tr><th width="127">Название</th><th width="92">Тип</th><th>Описание</th></tr></thead><tbody><tr><td>regions</td><td>List</td><td>Координаты [(x1, y1, x2, y2), (...), ..]</td></tr></tbody></table>

{% hint style="warning" %}
Если нового изображения нет, возвращает None, не замораживает текущий поток если нет кадра.
{% endhint %}

### size

```python
def size(self) -> Tuple[int, int]:
```

* **`size -> Tuple[int, int]`**: Возвращает текущий размер экрана.

### hz

```python
def hz(self) -> int:
```

* **`hz -> int`**: Возвращает текущую частоту обновления экрана.

{% hint style="info" %}
Все скрипты разделяют один и тот же экземпляр для захвата экрана, даже если выбраны разные координаты - В целях экономии ресурсов.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.neuralaim.ru/napi/dokumentaciya-or-api/screen.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
