OpenTTD Source 20260206-master-g4d4e37dbf1
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 77 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 89 of file geometry_type.hpp.

◆ Vertical()

uint RectPadding::Vertical ( ) const
inlineconstexpr

Get total vertical padding of RectPadding.

Returns
total vertical padding.

Definition at line 95 of file geometry_type.hpp.

Field Documentation

◆ bottom

uint8_t RectPadding::bottom = 0

Definition at line 81 of file geometry_type.hpp.

◆ left

uint8_t RectPadding::left = 0

Definition at line 78 of file geometry_type.hpp.

◆ right

uint8_t RectPadding::right = 0

Definition at line 80 of file geometry_type.hpp.

◆ top

uint8_t RectPadding::top = 0

Definition at line 79 of file geometry_type.hpp.

◆ zero

const RectPadding RectPadding::zero {}
inlinestatic

Definition at line 98 of file geometry_type.hpp.


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