mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 992731: Correctly treat a 'line' as a curve with a single inflection point stretching across the entire line. r=jwatt
This commit is contained in:
parent
55d3c4f46c
commit
4f4c6575e4
@ -375,8 +375,15 @@ FindInflectionPoints(const BezierControlPoints &aControlPoints,
|
||||
// Instead of a linear acceleration change we have a constant
|
||||
// acceleration change. This means the equation has no solution
|
||||
// and there are no inflection points, unless the constant is 0.
|
||||
// In that case the curve is a straight line, but we'll let
|
||||
// FlattenBezierCurveSegment deal with this.
|
||||
// In that case the curve is a straight line, essentially that means
|
||||
// the easiest way to deal with is is by saying there's an inflection
|
||||
// point at t == 0. The inflection point approximation range found will
|
||||
// automatically extend into infinity.
|
||||
if (c == 0) {
|
||||
*aCount = 1;
|
||||
*aT1 = 0;
|
||||
return;
|
||||
}
|
||||
*aCount = 0;
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user