A class that contains information on how a path will be drawn.
The path defined here will be drawn in software using CYICanvas.
- Note
- Does not use GPU / hardware acceleration.
- See also
- CYICanvas::DrawPath
#include <graphics/YiPath.h>
|
| static std::unique_ptr< CYIPath > | CreateLine (float fX1, float fY1, float fX2, float fY2) |
| |
| static std::unique_ptr< CYIPath > | CreateRectangle (float fX, float fY, float fWidth, float fHeight) |
| |
| static std::unique_ptr< CYIPath > | CreateRoundedRectangle (float fX, float fY, float fWidth, float fHeight, float fRX, float fRY) |
| |
| CYIPath::CYIPath |
( |
uint32_t |
nSegCountHint, |
|
|
uint32_t |
nVertexCountHint |
|
) |
| |
| virtual CYIPath::~CYIPath |
( |
| ) |
|
|
virtual |
| void CYIPath::CalculateBounds |
( |
| ) |
|
Deletes all segments this path contains.
Creates a Segment using the YI_PATH_CLOSE_TO command to "close" the path by going back to the starting point while drawing.
- See also
- Segment
-
YI_PATH_CMD
| static std::unique_ptr<CYIPath> CYIPath::CreateLine |
( |
float |
fX1, |
|
|
float |
fY1, |
|
|
float |
fX2, |
|
|
float |
fY2 |
|
) |
| |
|
static |
Creates a line starting at point (nX1, nY1) to point (nX2, nY2).
| static std::unique_ptr<CYIPath> CYIPath::CreateRectangle |
( |
float |
fX, |
|
|
float |
fY, |
|
|
float |
fWidth, |
|
|
float |
fHeight |
|
) |
| |
|
static |
Creates a nWidth by nHeight rectangle where the top left corner is situated at point (nX, nY).
| static std::unique_ptr<CYIPath> CYIPath::CreateRoundedRectangle |
( |
float |
fX, |
|
|
float |
fY, |
|
|
float |
fWidth, |
|
|
float |
fHeight, |
|
|
float |
fRX, |
|
|
float |
fRY |
|
) |
| |
|
static |
Creates a nWidth by nHeight rounded rectangle where the top left corner is situated at point (nX, nY).
- Note
- Rounded corners are defined using radiuses nRX and nRY.
| bool CYIPath::CubicTo |
( |
const glm::vec2 & |
vStart, |
|
|
const glm::vec2 & |
vMid, |
|
|
const glm::vec2 & |
vEnd |
|
) |
| |
Creates a Segment using the YI_PATH_CUBIC_TO command to move the cursor along a bezier curve created using vC1, vC2, vCEnd while drawing.
- See also
- Segment
-
YI_PATH_CMD
| bool CYIPath::GeneratePolygonData |
( |
| ) |
|
Generates polygon data based on the segments contained in the path.
| glm::vec4 CYIPath::GetFloatBounds |
( |
| ) |
const |
Returns the polygon bounds.
- Note
- The values contained are float data.
| YI_RECT CYIPath::GetIntBounds |
( |
| ) |
const |
Returns the polygon bounds.
- Note
- The values contained are int32_t data.
| uint32_t CYIPath::GetPolygonCount |
( |
| ) |
const |
| Segment* CYIPath::GetSegment |
( |
int32_t |
nIndex | ) |
|
Returns the segment stored at the index nIndex.
| int32_t CYIPath::GetSegmentCount |
( |
| ) |
|
Returns the number of segments contained in the path.
| bool CYIPath::LineTo |
( |
const glm::vec2 & |
vPoint | ) |
|
| bool CYIPath::MoveTo |
( |
const glm::vec2 & |
vPoint | ) |
|
Creates a Segment using the YI_PATH_MOVE_TO command to move the cursor to vPoint without drawing it.
- See also
- Segment
-
YI_PATH_CMD
The documentation for this class was generated from the following file: