tgbotxx 1.1.9.2
Telegram Bot C++ Library
Loading...
Searching...
No Matches
tgbotxx::StoryAreaPosition Struct Reference

Describes the position of a clickable area within a story https://core.telegram.org/bots/api#storyareaposition. More...

#include <StoryAreaPosition.hpp>

Public Member Functions

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

Public Attributes

float xPercentage {}
 The abscissa of the area's center, as a percentage of the media width.
 
float yPercentage {}
 The ordinate of the area's center, as a percentage of the media height.
 
float widthPercentage {}
 The width of the area's rectangle, as a percentage of the media width.
 
float heightPercentage {}
 The height of the area's rectangle, as a percentage of the media height.
 
float rotationAngle {}
 The clockwise rotation angle of the rectangle, in degrees; 0-360.
 
float cornerRadiusPercentage {}
 The radius of the rectangle corner rounding, as a percentage of the media width.
 

Detailed Description

Describes the position of a clickable area within a story https://core.telegram.org/bots/api#storyareaposition.

Definition at line 8 of file StoryAreaPosition.hpp.

Constructor & Destructor Documentation

◆ StoryAreaPosition() [1/2]

tgbotxx::StoryAreaPosition::StoryAreaPosition ( )
default

◆ StoryAreaPosition() [2/2]

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

Definition at line 10 of file StoryAreaPosition.hpp.

Member Function Documentation

◆ fromJson()

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

Deserializes this object from JSON.

Definition at line 46 of file StoryAreaPosition.hpp.

◆ toJson()

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

Serializes this object to JSON.

Returns
JSON representation of this object

Definition at line 34 of file StoryAreaPosition.hpp.

Member Data Documentation

◆ cornerRadiusPercentage

float tgbotxx::StoryAreaPosition::cornerRadiusPercentage {}

The radius of the rectangle corner rounding, as a percentage of the media width.

Definition at line 30 of file StoryAreaPosition.hpp.

◆ heightPercentage

float tgbotxx::StoryAreaPosition::heightPercentage {}

The height of the area's rectangle, as a percentage of the media height.

Definition at line 24 of file StoryAreaPosition.hpp.

◆ rotationAngle

float tgbotxx::StoryAreaPosition::rotationAngle {}

The clockwise rotation angle of the rectangle, in degrees; 0-360.

Definition at line 27 of file StoryAreaPosition.hpp.

◆ widthPercentage

float tgbotxx::StoryAreaPosition::widthPercentage {}

The width of the area's rectangle, as a percentage of the media width.

Definition at line 21 of file StoryAreaPosition.hpp.

◆ xPercentage

float tgbotxx::StoryAreaPosition::xPercentage {}

The abscissa of the area's center, as a percentage of the media width.

Definition at line 15 of file StoryAreaPosition.hpp.

◆ yPercentage

float tgbotxx::StoryAreaPosition::yPercentage {}

The ordinate of the area's center, as a percentage of the media height.

Definition at line 18 of file StoryAreaPosition.hpp.


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