---
title: "FeedRect"
description: "API documentation for FeedRect"
url: https://developer.disguise.one/python-api/docs/feedrect/
---

# FeedRect

Transfer content to/from screens, optionally warping & masking it.

FeedRect is an unnamed Resource.

FeedScene  

FeedProjection

See also: [Feed Guide](/plugins/guides/feed)

Base class (inherits properties and methods): _[Resource](/python-api/docs/resource#resource)_

## Nested Classes

-   [RenderMode](/python-api/docs/feedrect.rendermode#rendermode)

## Properties

#### **active** : _bool_ _(Read-Only)_

Used to determine if the rectangle should be updated & rendered

#### **contentMode** : _int_

Which channels to display

_Options: {0: ‘Colour’, 1: ‘Alpha key’, 2: ‘Inverse alpha key’}  
UserName: Content mode_

#### **deformStack** : _[DeformStack](/python-api/docs/deformstack#deformstack)_

The warping configuration used by this feed rect.

#### **displayTarget** : _int_

The display target (content source) of the feed.

#### **head** : _int_

The output head index.

#### **lock\_sizes** : _bool_

Keep input and output the same size when they change

#### **mask** : _[DxTexture](/python-api/docs/dxtexture#dxtexture)_

Per-channel mask for content.

#### **rect** : _[Rect](/python-api/docs/rect#rect)_

The rectangle on the surface

#### **referenceDisplay** : _[Display](/python-api/docs/display#display)_

The Display that this FeedRect references. Does not resolve forwarding displays.

#### **renderMode** : _[FeedRect.RenderMode](/python-api/docs/feedrect.rendermode#rendermode)_

#### **resolveDisplay** : _[Display](/python-api/docs/display#display)_ _(Read-Only)_

Resolves the (possibly forwarded) screen we’re rendering.

#### **rotation** : _float_

Rotation step of the feed rectangle.

#### **rotationIndex** : _int_

The index (0-3) of rotation for this FeedRect object, as we can only really rotate in 90 degree increments.

#### **screenRect** : _[Rect](/python-api/docs/rect#rect)_

The content rectangle within the screen.

#### **screenSizeSet** : _[Vec2](/python-api/docs/vec2#vec2)_

Internal: The size of the screen when the rectangle was last updated.

## Variables

#### **RenderNormal** : _Final\[[FeedRect.RenderMode](/python-api/docs/feedrect.rendermode#rendermode)\]_ = FeedRect.RenderMode.RenderNormal

#### **RenderTest** : _Final\[[FeedRect.RenderMode](/python-api/docs/feedrect.rendermode#rendermode)\]_ = FeedRect.RenderMode.RenderTest

#### **RenderTestLineup** : _Final\[[FeedRect.RenderMode](/python-api/docs/feedrect.rendermode#rendermode)\]_ = FeedRect.RenderMode.RenderTestLineup

## Methods

#### **canonicalRect**(self) -> _[Rect](/python-api/docs/rect#rect)_

Returns the canonical representation of the rectangle.

Mirrored feedrects have negative sizes and the rectangle origin is on the  
bottom/right instead of top/left (depending on which axes are mirrored.)  
The canonical rectangle always has the origin in the top/left and positive size.

**Returns** A new rectangle object with the canonical representation.

#### **lodFactor**(self) -> _float_

Returns the level of detail factor for this FeedRect.

The level of detail factor is a value between 0 and 1 that represents how much detail is required to render this FeedRect. A higher value indicates that more detail is required, while a lower value indicates that less detail is required.

**Returns** The level of detail factor for this FeedRect.

#### **outputRect**(self) -> _[Rect](/python-api/docs/rect#rect)_

The region in the output space (e.g. feed output head space)  
\*

-   This takes account of rotation, whereas the direct property access does not.

-   **Returns** A rotated rectangle representing the region to be rendered.

#### **renderDeformLookup**(self)

Updates a cached view of the feed warp deform lookup, based on the rectangle size.

#### **rotateRect**(self, r: _[Rect](/python-api/docs/rect#rect)_, rotationIndex: _int_) -> _[Rect](/python-api/docs/rect#rect)_

“Rotates” a rectangle by using the given rotation index.

Actually, flips the X&Y sizes if the rotation is 90 or 270.  
Performs some fixup of position to account for mirroring.  
Does not change size signs if mirrored.

**Parameters**:

-   r: The rectangle to rotate.
-   rotationIndex: The rotation index (0-3)

**Returns** The rotated rectangle.
