tgbotxx  1.1.6.9
Telegram Bot C++ Library
tgbotxx::MaskPosition Struct Reference

This object describes the position on faces where a mask should be placed by default. https://core.telegram.org/bots/api#maskposition. More...

#include <MaskPosition.hpp>

Public Member Functions

 MaskPosition ()=default
 
 MaskPosition (const nl::json &json)
 
nl::json toJson () const
 Serializes this object to JSON. More...
 
void fromJson (const nl::json &json)
 Deserializes this object from JSON. More...
 

Public Attributes

std::string point
 The part of the face relative to which the mask should be placed. One of “forehead”, “eyes”, “mouth”, or “chin”. More...
 
float xShift {}
 Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing -1.0 will place mask just to the left of the default mask position. More...
 
float yShift {}
 Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position. More...
 
float scale {}
 Mask scaling coefficient. For example, 2.0 means double size. More...
 

Detailed Description

This object describes the position on faces where a mask should be placed by default. https://core.telegram.org/bots/api#maskposition.

Definition at line 7 of file MaskPosition.hpp.

Constructor & Destructor Documentation

◆ MaskPosition() [1/2]

tgbotxx::MaskPosition::MaskPosition ( )
default

◆ MaskPosition() [2/2]

tgbotxx::MaskPosition::MaskPosition ( const nl::json &  json)
inlineexplicit

Definition at line 9 of file MaskPosition.hpp.

Member Function Documentation

◆ fromJson()

void tgbotxx::MaskPosition::fromJson ( const nl::json &  json)
inline

Deserializes this object from JSON.

Definition at line 41 of file MaskPosition.hpp.

◆ toJson()

nl::json tgbotxx::MaskPosition::toJson ( ) const
inline

Serializes this object to JSON.

Returns
JSON representation of this object

Definition at line 31 of file MaskPosition.hpp.

Member Data Documentation

◆ point

std::string tgbotxx::MaskPosition::point

The part of the face relative to which the mask should be placed. One of “forehead”, “eyes”, “mouth”, or “chin”.

Definition at line 15 of file MaskPosition.hpp.

◆ scale

float tgbotxx::MaskPosition::scale {}

Mask scaling coefficient. For example, 2.0 means double size.

Definition at line 26 of file MaskPosition.hpp.

◆ xShift

float tgbotxx::MaskPosition::xShift {}

Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing -1.0 will place mask just to the left of the default mask position.

Definition at line 19 of file MaskPosition.hpp.

◆ yShift

float tgbotxx::MaskPosition::yShift {}

Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position.

Definition at line 23 of file MaskPosition.hpp.


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