scaleAndTranslate

public void scaleAndTranslate(float scaleX, float scaleY, float translateX, float translateY)

Applies a scale and translation transform to the video output relative to a fixed logical coordinate space of 1920x1080.

This is commonly used in multi-instance or videowall configurations, where each player is responsible for rendering a subsection of the full virtual canvas. Transformations are applied using a central pivot (960, 540) in the logical space, and translation offsets are defined in logical pixels before scaling.

The actual output view size is dynamically mapped to the 1920x1080 logical space internally on the player side. As such, the client can use consistent values without needing to query or know the actual video or view resolution.

Example usage:

player.scaleAndTranslate(2f, 2f, -960f, -540f); // Show top-left quarter of the video
player.scaleAndTranslate(2f, 2f, 960f, 540f);   // Show bottom-right quarter
player.scaleAndTranslate(1f, 1f, 0f, 0f);       // Reset to full frame

Parameters

scaleX

Horizontal scale factor (e.g., 2.0 = zoom in by 2x).

scaleY

Vertical scale factor (e.g., 2.0 = zoom in by 2x).

translateX

Horizontal shift in logical pixels (e.g., -960 shifts one full screen left).

translateY

Vertical shift in logical pixels (e.g., -540 shifts one full screen up).