#include <vectorizer.h>
Public Types | |
typedef std::pair< float, float > | Vertex |
A vertex. | |
typedef std::list< Vertex > | Contour |
A contour. | |
typedef std::list< Contour > | ContourList |
A list of contours. | |
Public Member Functions | |
Vectorizer (const FT_Outline &outline, int subdiv) | |
Create a new vectorizer. | |
const ContourList & | getContours () const |
Get all contours. | |
int | getNumVertices () const |
Get the number of vertices. |
A utility to vectorize the outlines of glyphs and evaluate bezier splines.
glttf::Vectorizer::Vectorizer | ( | const FT_Outline & | outline, | |
int | subdiv | |||
) |
Create a new vectorizer.
Creates a new vectorizer and evaluates the outline.
The subdiv
parameter indicates the level of subdivision for the bezier splines in the outline. Greater value is more subdivision and detail. Higher levels of subdivision add complexity and memory usage and reduce speed. Values equal to or smaller than 1 result in no subdivision.
outline | the outline of the glyph | |
subdiv | the level of subdivision for bezier splines |
const ContourList& glttf::Vectorizer::getContours | ( | ) | const |
Get all contours.
int glttf::Vectorizer::getNumVertices | ( | ) | const |
Get the number of vertices.