GlistEngine
Loading...
Searching...
No Matches
gRoundedRectangle.h
Go to the documentation of this file.
1/*
2 * gRoundedRectangle.h
3 *
4 * Created on: 15 Feb 2023
5 * Author: Umutcan Turkmen
6 */
7
8#ifndef GRAPHICS_PRIMITIVES_GROUNDEDRECTANGLE_H_
9#define GRAPHICS_PRIMITIVES_GROUNDEDRECTANGLE_H_
10
11#include "gMesh.h"
12
13class gRoundedRectangle : public gMesh {
14public:
16 gRoundedRectangle(int x, int y, int w, int h, int radius, bool isFilled);
18
19 void draw() override;
20 void draw(int x, int y, int w, int h, int radius, bool isFilled);
21 void setRoundedRectanglePoints(int x, int y, int w, int h, int radius, bool isFilled);
22private:
23 //This is the default value of vertices of the created shape
24 //Since it has as many vertices as its width or height (whichever is higher)
25 //it will be seen as circular
26 float numberOfVertices = 100; //
27};
28
29#endif /* GRAPHICS_PRIMITIVES_GROUNDEDRECTANGLE_H_ */
Definition gMesh.h:27
Definition gRoundedRectangle.h:13
void draw() override
~gRoundedRectangle() override
gRoundedRectangle(int x, int y, int w, int h, int radius, bool isFilled)
void draw(int x, int y, int w, int h, int radius, bool isFilled)
void setRoundedRectanglePoints(int x, int y, int w, int h, int radius, bool isFilled)