OpenTTD Source 20260531-master-g0e951f3528
RectPadding Struct Reference

Padding dimensions to apply to each side of a Rect. More...

#include <geometry_type.hpp>

Inheritance diagram for RectPadding:
NWidgetPartPaddings

Public Member Functions

constexpr uint Horizontal () const
 Get total horizontal padding of RectPadding.
constexpr uint Vertical () const
 Get total vertical padding of RectPadding.

Data Fields

uint8_t left = 0
uint8_t top = 0
uint8_t right = 0
uint8_t bottom = 0

Static Public Attributes

static const RectPadding zero {}

Detailed Description

Padding dimensions to apply to each side of a Rect.

Definition at line 89 of file geometry_type.hpp.

Member Function Documentation

◆ Horizontal()

uint RectPadding::Horizontal ( ) const
inlineconstexpr

Get total horizontal padding of RectPadding.

Returns
total horizontal padding.

Definition at line 101 of file geometry_type.hpp.

◆ Vertical()

uint RectPadding::Vertical ( ) const
inlineconstexpr

Get total vertical padding of RectPadding.

Returns
total vertical padding.

Definition at line 107 of file geometry_type.hpp.

Field Documentation

◆ bottom

uint8_t RectPadding::bottom = 0

Definition at line 93 of file geometry_type.hpp.

◆ left

uint8_t RectPadding::left = 0

Definition at line 90 of file geometry_type.hpp.

◆ right

uint8_t RectPadding::right = 0

Definition at line 92 of file geometry_type.hpp.

◆ top

uint8_t RectPadding::top = 0

Definition at line 91 of file geometry_type.hpp.

◆ zero

const RectPadding RectPadding::zero {}
inlinestatic

Definition at line 110 of file geometry_type.hpp.


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