Aegis2D
Modular C++26 2D game engine for networked games
Loading...
Searching...
No Matches
aegis2d::render::Letterbox Struct Reference

Where the logical screen goes in the window's framebuffer. More...

#include <aegis2d/render/letterbox.hpp>

Public Member Functions

constexpr bool empty () const noexcept
 Tells whether the logical screen covers no pixel (a minimized window).
 

Public Attributes

int x = 0
 Left edge, in framebuffer pixels from the left.
 
int y = 0
 Top edge, in framebuffer pixels from the top.
 
int width = 0
 Width in framebuffer pixels.
 
int height = 0
 Height in framebuffer pixels.
 
float scale = 0.0F
 Framebuffer pixels per logical pixel; 0 when nothing is shown.
 

Friends

constexpr bool operator== (const Letterbox &, const Letterbox &) noexcept=default
 Compares the areas.
 

Detailed Description

Where the logical screen goes in the window's framebuffer.

Member Function Documentation

◆ empty()

constexpr bool aegis2d::render::Letterbox::empty ( ) const
inlineconstexprnoexcept

Tells whether the logical screen covers no pixel (a minimized window).

Returns
true when the width or the height is 0.

Friends And Related Symbol Documentation

◆ operator==

constexpr bool operator== ( const Letterbox &  ,
const Letterbox &   
)
friend

Compares the areas.

Member Data Documentation

◆ height

int aegis2d::render::Letterbox::height = 0

Height in framebuffer pixels.

◆ scale

float aegis2d::render::Letterbox::scale = 0.0F

Framebuffer pixels per logical pixel; 0 when nothing is shown.

◆ width

int aegis2d::render::Letterbox::width = 0

Width in framebuffer pixels.

◆ x

int aegis2d::render::Letterbox::x = 0

Left edge, in framebuffer pixels from the left.

◆ y

int aegis2d::render::Letterbox::y = 0

Top edge, in framebuffer pixels from the top.


The documentation for this struct was generated from the following file: