pods::...verlay(3pm)
π NAME π
okay so this page β pods::...verlay(3pm) β comes from the User Contributed Perl Documentation, and it's all about SDL::Overlay, aka YUV Video overlay. Slay. π
π CATEGORY π
Core, Video, Structure.
β¨ SYNOPSIS β¨
First, import these modules so you get access to the constants and functions needed for overlay, bestie:
use SDL;
use SDL::Video;
use SDL::Overlay;
Init the video subsystem:
SDL::Init(SDL_INIT_VIDEO);
Create a display to use:
my $display = SDL::Video::set_video_mode(640, 480, 32, SDL_SWSURFACE);
Create and attach the display to a new overlay:
my $overlay = SDL::Overlay->new( 100, 100, SDL_YV12_OVERLAY, $display);
π¦ DESCRIPTION π¦
An SDL_Overlay lets you do video rendering on an SDL_Surface that's a display. Periodt. π
The term 'overlay' is lowkey a misnomer, because unless the overlay is created in hardware, the contents of the display surface underneath the area where the overlay is shown will be overwritten when the overlay is displayed. No cap.
π METHODS π
π οΈ new ( $width, $height, $YUV_flag, $display) π οΈ
The constructor creates an SDL::Overlay with the specified width, height, and format (peep the YUV_Flags list below for the available formats), for the provided display. π«Ά
π¨ Note: thedisplayargument needs to actually be the surface created bySDL::Video::SetVideoMode, otherwise this function will segfault. Not cute. At all. π
my $overlay = SDL::Overlay->new( $width, $height, $YUV_flag, $display );
π YUV_Flags π
More information on YUV formats can be found at http://www.fourcc.org/indexyuv.htm .
SDL_YV12_OVERLAYβ0x32315659β/* Planar mode: Y + V + U */SDL_IYUV_OVERLAYβ0x56555949β/* Planar mode: Y + U + V */SDL_YUY2_OVERLAYβ0x32595559β/* Packed mode: Y0+U0+Y1+V0 */SDL_UYVY_OVERLAYβ0x59565955β/* Packed mode: U0+Y0+V0+Y1 */SDL_YVYU_OVERLAYβ0x55595659β/* Packed mode: Y0+V0+Y1+U0 */
π format π
Overlay format (see YUV_Flags).
π w, h π
Width and height of overlay.
π§ planes π§
Number of planes in the overlay. Usually either 1 or 3.
π pitches π
An array of pitches, one for each plane. Pitch is the length of a row in bytes.
π pixels π
As of release 2.3 direct right to overlay is disable.
An array of pointers to the data of each plane. The overlay should be locked before these pointers are used.
see SDL::Video::lock_YUV_overlay, SDL::Video::unload_YUV_overlay
β hw_overlay β
This will be set to 1 if the overlay is hardware accelerated.
πΈ AUTHORS πΈ
See "AUTHORS" in SDL.
π source/version: perl v5.42.0 Β· date: 2024-05-01 Β· page: pods::...verlay(3pm) β bye bestie! π
π¦ where this page comes from
- opensuse-leap 16.0: perl-SDL 2.548-bp160.1.13 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: perl-SDL 2.548-bp160.1.13 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: perl-SDL 2.548-bp160.1.13 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: perl-SDL 2.548-bp160.1.13 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms