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, float rotateAngle = 0.0f, float pivotx = 0.5f, float pivoty = 0.5f);
18
19 void draw() override;
20 void draw(int x, int y, int w, int h, int radius, bool isFilled, float rotateAngle = 0.0f, float pivotx = 0.5f, float pivoty = 0.5f);
21 void setRoundedRectanglePoints(int x, int y, int w, int h, int radius, bool isFilled, float rotateAngle = 0.0f, float pivotx = 0.5f, float pivoty = 0.5f);
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_ */
gRoundedRectangle(int x, int y, int w, int h, int radius, bool isFilled, float rotateAngle=0.0f, float pivotx=0.5f, float pivoty=0.5f)
void draw() override
~gRoundedRectangle() override
void setRoundedRectanglePoints(int x, int y, int w, int h, int radius, bool isFilled, float rotateAngle=0.0f, float pivotx=0.5f, float pivoty=0.5f)
void draw(int x, int y, int w, int h, int radius, bool isFilled, float rotateAngle=0.0f, float pivotx=0.5f, float pivoty=0.5f)