pods::...Format(3pm)
π pods::...Format(3pm)
okay so real talk, the manual name on this one is pods::...Format (that 3pm is just telling you it's a Perl module page, no cap) but the actual star of the show, the main character, is SDL::PixelFormat β and yes bestie we're getting into it.
β¨ NAME β¨
SDL::PixelFormat β it stores surface format information π
πΈ CATEGORY πΈ
Core, Video, Structure β she's core, she's video, she's a structure. Versatile icon.
π¦ SYNOPSIS π¦
my $surface = SDL::Surface->new( ...
$surface->format; #this returns the PixelFormat object attached to this surface
So here's the tea: PixelFormat is only created inside an SDL::Surface. You don't just make one yourself, she doesn't work like that. This module literally just provides getters to the surface's pixelformat β read-only era. Later on they'll provide setting capability, but that's a future era, not this one. π
π DESCRIPTION π
An SDL::PixelFormat stores surface format information. That's it, that's the whole gig. She holds the format info, she's iconic for it. β
π METHODS π
π palette
$surface->format->palette;
Returns the SDL_Palette and SDL::Palette of the format of the surface. Palette girly pop. π
π BitsPerPixel
$surface->format->BitsPerPixel;
The number of bits used to represent each pixel in a surface. Usually 8, 16, 24 or 32. Heads up though: (1 to 7 are not allowed when creating a surface or open a video mode β so like, don't even try it π)
π§ BytesPerPixel
$surface->format->BytesPerPixel;
The number of bytes used to represent each pixel in a surface. Usually one to four. See the BytesPerPixel/BitsPerPixel duo? obsessed. π«Ά
π [RGBA]loss
$surface->format->Rloss; #red loss
$surface->format->Bloss; #blue loss
$surface->format->Gloss; #green loss
$surface->format->Aloss; #alpha loss
Precision loss of each color component (2[RGBA]loss). All four of them, red, blue, green and alpha β she's thorough. π
π₯ [RGBA]shift
$surface->format->Rshift; #red shift
$surface->format->Bshift; #blue shift
$surface->format->Gshift; #green shift
$surface->format->Ashift; #alpha shift
Binary left shift of each color component in the pixel value. Shifty little guys, all four. β¨
π [RGBA]mask
$surface->format->Rmask; #red mask
$surface->format->Bmask; #blue mask
$surface->format->Gmask; #green mask
$surface->format->Amask; #alpha mask
Binary left shift of each color component in the pixel value. Yep β that's what the page says for the masks, same line as the shifts, fr fr, iykyk. All four masks listed: Rmask, Bmask, Gmask, Amask. π
πΈ colorkey
$surface->format->colorkey;
Pixel value of transparent pixels. The invisible ones. Ghost aesthetic. π»
π alpha
$surface->format->alpha;
Overall surface alpha value. The vibe check of how see-through your surface is. π¦
β SEE ALSO β
SDL::Surface β go read that one next bestie, it's the whole reason this module even exists. π
π AUTHORS π
See AUTHORS in SDL. (Yes that's all it says, go look it up, they're in there somewhere π
)
okay that's the whole page, mwah π β this iconic little number comes to you from perl v5.42.0, dated 2024-05-01, and it's literally giving pods::...Format(3pm) energy from start to finish. slay, bye! πβ¨
π¦ 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