sokol/letterbox
sokol_letterbox
Types
4Anchor
Anchor :: enum i32 {
CENTER = 0,
TOP = 1,
BOTTOM = 2,
LEFT = 3,
RIGHT = 4,
}SourceAnchor the content to a side. The default is to center the content. Used in slbx_letterbox_desc.
Border
Border :: struct {
left: c.int,
right: c.int,
top: c.int,
bottom: c.int,
}SourceDefines a 'safe border' in pixels. Used as nested struct in slbx_letterbox_desc.
Letterbox_Desc
Letterbox_Desc :: struct {
content_aspect_ratio: f32,
anchor: Anchor,
border: Border,
}SourceThe content letterbox description. Used as input to the slbx_letterbox() function.
Viewport
Viewport :: struct {
x: c.int,
y: c.int,
width: c.int,
height: c.int,
}SourceThe resulting viewport. Return value of slbx_letterbox()
Constants
4DEBUG
DEBUG :: _ = #config(SOKOL_LETTERBOX_DEBUG, SOKOL_DEBUG)SourceSOKOL_DEBUG
SOKOL_DEBUG :: _ = #config(SOKOL_DEBUG, ODIN_DEBUG)SourceUSE_DLL
USE_DLL :: _ = #config(SOKOL_DLL, false)SourceUSE_GL
USE_GL :: _ = #config(SOKOL_USE_GL, false)Source