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

Method splitInThirds

MyGUIEngine/src/msdfgen/core/edge-segments.cpp:508–512  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

506}
507
508void LinearSegment::splitInThirds(EdgeSegment *&part0, EdgeSegment *&part1, EdgeSegment *&part2) const {
509 part0 = new LinearSegment(p[0], point(1/3.), color);
510 part1 = new LinearSegment(point(1/3.), point(2/3.), color);
511 part2 = new LinearSegment(point(2/3.), p[1], color);
512}
513
514void QuadraticSegment::splitInThirds(EdgeSegment *&part0, EdgeSegment *&part1, EdgeSegment *&part2) const {
515 part0 = new QuadraticSegment(p[0], mix(p[0], p[1], 1/3.), point(1/3.), color);

Callers 4

normalizeMethod · 0.80
edgeColoringSimpleFunction · 0.80
edgeColoringInkTrapFunction · 0.80
edgeColoringByDistanceFunction · 0.80

Calls 1

mixFunction · 0.85

Tested by

no test coverage detected