Skip to main content

SourceTransformOptions

Electron APIs / recorder / SourceTransformOptions

Options for transforming and positioning a source element (e.g. an image or video) within an output container or scene.

Typically used to control how content is translated, scaled, rotated, aligned, and cropped within a visual presentation area.

Properties

PropertyTypeDescription
alignment?AlignmentOptionsAlignment of the source within the output. The alignment is relative to the top-left corner of the output. Default is TopLeft.
boundsAlignment?AlignmentOptionsAlignment of the source within the bounding box. Relevant only when bounds width or height are defined. Default is Center.
boundsHeight?numberBounding box height in pixels.
boundsType?BoundsTypeDefines a bounding box for the source within the output. Changing the bounds type or alignment only has an effect if a bounds width or height is specified. Type of bounds to apply. Default is None.
boundsWidth?numberBounding box width in pixels.
cropBottom?number-
cropLeft?numberCrop options in pixels. Default is no crop.
cropRight?number-
cropToBounds?booleanCrop to bounds. Default is False.
cropTop?number-
positionX?numberPosition X in pixels. Default is 0.
positionY?numberPosition Y in pixels. Default is 0.
rotation?numberRotation in degrees (-360.0 to 360.0). Default is 0.
sizeHeight?numberSize Height in pixels.
sizeWidth?numberSize Width in pixels.