FeedRect
Transfer content to/from screens, optionally warping & masking it.
FeedRect is an unnamed Resource.
FeedSceneFeedProjection
Category: Feed
Base class: Resource
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
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
Per-channel mask for content.
rect : Rect
The rectangle on the surface
referenceDisplay : Display
The Display that this FeedRect references. Does not resolve forwarding displays.
renderMode : int
resolveDisplay : 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
The content rectangle within the screen.
screenSizeSet : Vec2
Internal: The size of the screen when the rectangle was last updated.
Variables
RenderNormal : Final[int] = 0
RenderTest : Final[int] = 1
RenderTestLineup : Final[int] = 2
Methods
canonicalRect(self) -> 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
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, rotationIndex: int) -> 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.