MyScript Interactive Ink SDK  3.1.3
Public Member Functions | Public Attributes | List of all members
myscript::iink::graphics::Rectangle Struct Reference

#include <Rectangle.h>

Public Member Functions

 Rectangle ()=default
 
 Rectangle (float x, float y, float width, float height) noexcept
 
bool operator== (const Rectangle &other) const noexcept
 
bool operator!= (const Rectangle &other) const noexcept
 

Public Attributes

float x = 0.f
 
float y = 0.f
 
float width = 0.f
 
float height = 0.f
 

Detailed Description

Represents an axis aligned rectangle on the 2D plane.

Constructor & Destructor Documentation

◆ Rectangle() [1/2]

myscript::iink::graphics::Rectangle::Rectangle ( )
default

Default constructor.

◆ Rectangle() [2/2]

myscript::iink::graphics::Rectangle::Rectangle ( float  x,
float  y,
float  width,
float  height 
)
inlinenoexcept

Constructor.

Parameters
xthe x coordinate of the top left point.
ythe y coordinate of the top left point.
widththe width.
heightthe height.

Member Function Documentation

◆ operator==()

bool myscript::iink::graphics::Rectangle::operator== ( const Rectangle &  other) const
inlinenoexcept

Operator == overload.

Parameters
otherthe rectangle to compare this with.
Returns
true if the rectangles are strictly equal, otherwise false.

◆ operator!=()

bool myscript::iink::graphics::Rectangle::operator!= ( const Rectangle &  other) const
inlinenoexcept

Operator != overload.

Parameters
otherthe rectangle to compare this with.
Returns
true if the rectangles are strictly equal, otherwise false.

Member Data Documentation

◆ x

float myscript::iink::graphics::Rectangle::x = 0.f

The x position of the left edge of the rectangle.

◆ y

float myscript::iink::graphics::Rectangle::y = 0.f

The y position of the top edge of the rectangle.

◆ width

float myscript::iink::graphics::Rectangle::width = 0.f

The width of the rectangle.

◆ height

float myscript::iink::graphics::Rectangle::height = 0.f

The height of the rectangle.


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