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
| Property | Type | Description |
|---|---|---|
alignment? | AlignmentOptions | Alignment of the source within the output. The alignment is relative to the top-left corner of the output. Default is TopLeft. |
boundsAlignment? | AlignmentOptions | Alignment of the source within the bounding box. Relevant only when bounds width or height are defined. Default is Center. |
boundsHeight? | number | Bounding box height in pixels. |
boundsType? | BoundsType | Defines 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? | number | Bounding box width in pixels. |
cropBottom? | number | - |
cropLeft? | number | Crop options in pixels. Default is no crop. |
cropRight? | number | - |
cropToBounds? | boolean | Crop to bounds. Default is False. |
cropTop? | number | - |
positionX? | number | Position X in pixels. Default is 0. |
positionY? | number | Position Y in pixels. Default is 0. |
rotation? | number | Rotation in degrees (-360.0 to 360.0). Default is 0. |
sizeHeight? | number | Size Height in pixels. |
sizeWidth? | number | Size Width in pixels. |