A class that contains information on how to fill a polygon.
The polygon fill defined here will be drawn in software using CYICanvas.
- Note
- Does not use GPU / hardware acceleration.
- See also
- CYICanvas::DrawPath
#include <graphics/YiPolygonFill.h>
| CYIPolygonFill::CYIPolygonFill |
( |
| ) |
|
| virtual CYIPolygonFill::~CYIPolygonFill |
( |
| ) |
|
|
virtual |
| bool CYIPolygonFill::Create |
( |
int32_t |
nWidth, |
|
|
int32_t |
nHeight |
|
) |
| |
Allocates resources for a nWidth by nHeight pixels bitmap.
| void CYIPolygonFill::Destroy |
( |
| ) |
|
Frees all the resources allocated in Create().
Fills a polygon defined by pPolygonData inside pBitmap using the Color or pGradient.
- Note
- pGradient is optional. The polygon will be filled with pGradient only if bNonZeroFill is true and pGradient is not nullptr. If bNonZeroFill is false or pGradient is nullptr, the polygon will be filled with Color.
- See also
- CYIBitmap
-
CYIColor
-
CYIPolygonData
-
CYIGradient.
| static void CYIPolygonFill::PolygonDataBounds |
( |
const CYIPolygonData & |
polygonDataIn, |
|
|
glm::vec4 & |
polygonBounds |
|
) |
| |
|
static |
Calculates the polygon bounds based on polygonDataIn. The result is stored inside polygonBounds.
- See also
- CYIPolygonData
| const uint32_t CYIPolygonFill::MAX_EDGES = 1000 |
|
static |
The documentation for this class was generated from the following file: