libtcod
Loading...
Searching...
No Matches
TCOD_ViewportOptions Struct Reference

Viewport options for the rendering context. More...

#include <context_viewport.h>

Public Attributes

int tcod_version
 Must be set to TCOD_COMPILEDVERSION.
bool keep_aspect
 If true then the aspect ratio will be kept square when the console is scaled.
bool integer_scaling
 If true then console scaling will be fixed to integer increments.
TCOD_ColorRGBA clear_color
 The color to clear the screen with before rendering the console.
float align_x
 Alignment of the console when it is letter-boxed: 0.0f renders the console in the upper-left corner, and 1.0f in the lower-right.
float align_y

Detailed Description

Viewport options for the rendering context.

embed:rst:leading-asterisk 
.. versionadded:: 1.16

Member Data Documentation

◆ align_x

float TCOD_ViewportOptions::align_x

Alignment of the console when it is letter-boxed: 0.0f renders the console in the upper-left corner, and 1.0f in the lower-right.

Values of 0.5f will center the console. Values outside of the range 0.0f to 1.0f are clamped.

◆ integer_scaling

bool TCOD_ViewportOptions::integer_scaling

If true then console scaling will be fixed to integer increments.

Has no effect if the console must be scaled down.

◆ keep_aspect

bool TCOD_ViewportOptions::keep_aspect

If true then the aspect ratio will be kept square when the console is scaled.

The view will be letter-boxed.

If false the console will be stretched to fill the screen.

Set this is true if your tileset is deigned for square pixels.


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