MCPcopy Create free account
hub / github.com/MyGUI/mygui / ftCubicTo

Function ftCubicTo

MyGUIEngine/src/msdfgen/ext/import-font.cpp:94–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94static int ftCubicTo(const FT_Vector *control1, const FT_Vector *control2, const FT_Vector *to, void *user) {
95 FtContext *context = reinterpret_cast<FtContext *>(user);
96 Point2 endpoint = ftPoint2(*to, context->scale);
97 if (endpoint != context->position || crossProduct(ftPoint2(*control1, context->scale)-endpoint, ftPoint2(*control2, context->scale)-endpoint)) {
98 context->contour->addEdge(EdgeHolder(context->position, ftPoint2(*control1, context->scale), ftPoint2(*control2, context->scale), endpoint));
99 context->position = endpoint;
100 }
101 return 0;
102}
103
104static double getFontCoordinateScale(const FT_Face &face, FontCoordinateScaling coordinateScaling) {
105 switch (coordinateScaling) {

Callers

nothing calls this directly

Calls 4

ftPoint2Function · 0.85
crossProductFunction · 0.85
EdgeHolderClass · 0.85
addEdgeMethod · 0.45

Tested by

no test coverage detected