ScreenCoordinateTransform
class ScreenCoordinateTransform(val screenSize: Size, val previewSize: Size, val videoGravity: VideoGravity = VideoGravity.RESIZE_ASPECT)
Converts between composition pixels and preview-local pixels using centered videoGravity.
Use the preview's actual pixel size, not dp. Create a new transform when either size or the gravity changes. Points outside the displayed content are not clamped; toScreen can return negative coordinates in letterbox bars. Invalid sizes or non-finite input return null.
Constructors
Link copied to clipboard
constructor(screenSize: Size, previewSize: Size, videoGravity: VideoGravity = VideoGravity.RESIZE_ASPECT)