Declares splash screen layout calculations.
More...
#include <hal/video.h>
Go to the source code of this file.
Declares splash screen layout calculations.
◆ calculate_display_width()
| int splash::calculate_display_width |
( |
int | screenHeight, |
|
|
const VIDEO_MODE & | videoMode, |
|
|
unsigned long | encoderSettings ) |
Calculate the logical display width for square-pixel UI layout.
When the framebuffer aspect ratio differs from the effective display aspect, this returns the width that should be used for layout before horizontal scaling is applied back onto the framebuffer.
- Parameters
-
| screenHeight | Height of the destination surface. |
| videoMode | The video mode being rendered. |
| encoderSettings | The value returned by XVideoGetEncoderSettings(). |
- Returns
- The logical display width corresponding to the effective aspect ratio.
◆ calculate_logo_destination()
| SplashLayout splash::calculate_logo_destination |
( |
int | screenWidth, |
|
|
int | screenHeight, |
|
|
int | logoWidth, |
|
|
int | logoHeight, |
|
|
const VIDEO_MODE & | videoMode, |
|
|
unsigned long | encoderSettings ) |
Calculate the centered destination rectangle for the splash logo.
- Parameters
-
| screenWidth | Width of the destination surface. |
| screenHeight | Height of the destination surface. |
| logoWidth | Width of the source logo. |
| logoHeight | Height of the source logo. |
| videoMode | Active video mode. |
| encoderSettings | The value returned by XVideoGetEncoderSettings(). |
- Returns
- The scaled and centered destination rectangle.
◆ get_display_aspect_ratio()
| float splash::get_display_aspect_ratio |
( |
const VIDEO_MODE & | videoMode, |
|
|
unsigned long | encoderSettings ) |
Return the display aspect ratio after encoder corrections.
Standard-definition framebuffers may need to be displayed with a corrected aspect ratio based on the active encoder settings.
- Parameters
-
| videoMode | The video mode being rendered. |
| encoderSettings | The value returned by XVideoGetEncoderSettings(). |
- Returns
- The effective display aspect ratio.
◆ get_framebuffer_aspect_ratio()
| float splash::get_framebuffer_aspect_ratio |
( |
const VIDEO_MODE & | videoMode | ) |
|
Return the framebuffer aspect ratio for a video mode.
- Parameters
-
| videoMode | The video mode being rendered. |
- Returns
- The framebuffer width divided by height.
◆ get_logo_width_aspect_correction()
| float splash::get_logo_width_aspect_correction |
( |
const VIDEO_MODE & | videoMode, |
|
|
unsigned long | encoderSettings ) |
Return the width correction factor applied before scaling the logo.
- Parameters
-
| videoMode | The video mode being rendered. |
| encoderSettings | The value returned by XVideoGetEncoderSettings(). |
- Returns
- The correction multiplier applied to the source logo width.