7 #include <glm/gtc/type_ptr.hpp> 73 const glm::vec2 &
GetPoint(uint32_t nIndex)
const;
85 bool AddPoint(
const glm::vec2 &vPoint);
90 uint32_t m_nCountHint;
91 std::vector<glm::vec2> m_Points;
95 CYIPath(uint32_t nSegCountHint, uint32_t nVertexCountHint);
110 bool MoveTo(
const glm::vec2 &vPoint);
119 bool LineTo(
const glm::vec2 &vPoint);
128 bool CubicTo(
const glm::vec2 &vStart,
const glm::vec2 &vMid,
const glm::vec2 &vEnd);
141 static std::unique_ptr<CYIPath>
CreateLine(
float fX1,
float fY1,
float fX2,
float fY2);
146 static std::unique_ptr<CYIPath>
CreateRectangle(
float fX,
float fY,
float fWidth,
float fHeight);
153 static std::unique_ptr<CYIPath>
CreateRoundedRectangle(
float fX,
float fY,
float fWidth,
float fHeight,
float fRX,
float fRY);
211 std::vector<std::unique_ptr<Segment>> m_Segments;
213 glm::vec4 m_PolygonBounds;
214 uint32_t m_nSegCountHint;
215 uint32_t m_nVertexCountHint;
220 #endif // _YI_PATH_H_ glm::vec2 p3
Definition: YiPath.h:27
const glm::vec2 & GetPoint(uint32_t nIndex) const
bool GeneratePolygonData()
bool AddPoint(const glm::vec2 &vPoint)
static std::unique_ptr< CYIPath > CreateRectangle(float fX, float fY, float fWidth, float fHeight)
Definition: YiPredef.h:183
static std::unique_ptr< CYIPath > CreateRoundedRectangle(float fX, float fY, float fWidth, float fHeight, float fRX, float fRY)
Command that moves the cursor to the starting point while drawing a line along the path...
Definition: YiPath.h:19
std::vector< YI_POLYGON_VERTEX > CYIPolygonData
A type representing multiple vertices of a polygon.
Definition: YiPolygonFill.h:32
Command that moves the cursor to a position while drawing a line along the path.
Definition: YiPath.h:17
Segment(YI_PATH_CMD nType, uint32_t nCountHint)
glm::vec2 p1
Definition: YiPath.h:25
const CYIPolygonData * GetPolygonData() const
YI_PATH_BOUNDS_INDEX
Definition: YiPath.h:32
bool CubicTo(const glm::vec2 &vStart, const glm::vec2 &vMid, const glm::vec2 &vEnd)
A class representing one segment of a path.
Definition: YiPath.h:59
uint32_t GetPolygonCount() const
Command that moves the cursor along a bezier curve while drawing a line along the path...
Definition: YiPath.h:18
YI_PATH_CMD
Definition: YiPath.h:14
bool LineTo(const glm::vec2 &vPoint)
A class that contains information on how a path will be drawn.
Definition: YiPath.h:50
Command that moves the cursor instantaneously to a position.
Definition: YiPath.h:16
glm::vec4 GetFloatBounds() const
YI_RECT GetIntBounds() const
int32_t GetSegmentCount()
Segment * GetSegment(int32_t nIndex)
bool MoveTo(const glm::vec2 &vPoint)
glm::vec2 p2
Definition: YiPath.h:26
static std::unique_ptr< CYIPath > CreateLine(float fX1, float fY1, float fX2, float fY2)
glm::vec2 p4
Definition: YiPath.h:28