Axle 0.1.0
A simple, lightweight C++ game framework built on top of Raylib.
 
Loading...
Searching...
No Matches
Axle::Rectangle Class Reference

A class representing a rectangle. More...

#include <shapes.h>

Inheritance diagram for Axle::Rectangle:
Axle::Shape

Public Member Functions

 Rectangle (int x, int y, int width, int height)
 Construct a new Rectangle object.
 
 Rectangle (Axle::Math::Vector2 position, int width, int height)
 Construct a new Rectangle object.
 
 Rectangle (Axle::Math::Vector2 topLeft, Axle::Math::Vector2 bottomRight)
 Construct a new Rectangle object.
 
void Draw () const override
 Draw the shape on the screen.
 

Additional Inherited Members

- Public Attributes inherited from Axle::Shape
Axle::Color color
 The color of the shape.
 
Axle::Math::Vector2 position
 The position of the center of the shape.
 
- Protected Member Functions inherited from Axle::Shape
 Shape ()
 Construct a new Shape object.
 

Detailed Description

A class representing a rectangle.

Constructor & Destructor Documentation

◆ Rectangle() [1/3]

Axle::Rectangle::Rectangle ( int x,
int y,
int width,
int height )

Construct a new Rectangle object.

Parameters
xThe x coordinate of the center of the rectangle
yThe y coordinate of the center of the rectangle
widthThe width of the rectangle
heightThe height of the rectangle

◆ Rectangle() [2/3]

Axle::Rectangle::Rectangle ( Axle::Math::Vector2 position,
int width,
int height )

Construct a new Rectangle object.

Parameters
positionThe position of the center of the rectangle
widthThe width of the rectangle
heightThe height of the rectangle

◆ Rectangle() [3/3]

Axle::Rectangle::Rectangle ( Axle::Math::Vector2 topLeft,
Axle::Math::Vector2 bottomRight )

Construct a new Rectangle object.

Parameters
topLeftThe top left corner of the rectangle
bottomRightThe bottom right corner of the rectangle

Member Function Documentation

◆ Draw()

void Axle::Rectangle::Draw ( ) const
overridevirtual

Draw the shape on the screen.

Implements Axle::Shape.


The documentation for this class was generated from the following files: