зеркало из https://github.com/mozilla/moz-skia.git
fix strokes for quadratics. #define SK_IGNORE_QUAD_STROKE_FIX to
retain the old behavior (i.e. for skia.gyp until we rebaseline) git-svn-id: http://skia.googlecode.com/svn/trunk@6937 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
Родитель
1a60dab449
Коммит
dec8125e11
|
@ -255,9 +255,19 @@ void SkPathStroker::quad_to(const SkPoint pts[3],
|
|||
this->quad_to(&tmp[0], normalAB, unitNormalAB, &norm, &unit, subDivide);
|
||||
this->quad_to(&tmp[2], norm, unit, normalBC, unitNormalBC, subDivide);
|
||||
} else {
|
||||
SkVector normalB, unitB;
|
||||
SkVector normalB;
|
||||
|
||||
#ifdef SK_IGNORE_QUAD_STROKE_FIX
|
||||
SkVector unitB;
|
||||
SkAssertResult(set_normal_unitnormal(pts[0], pts[2], fRadius,
|
||||
&normalB, &unitB));
|
||||
#else
|
||||
normalB = pts[2] - pts[0];
|
||||
normalB.rotateCCW();
|
||||
SkScalar dot = SkPoint::DotProduct(unitNormalAB, *unitNormalBC);
|
||||
SkAssertResult(normalB.setLength(SkScalarDiv(fRadius,
|
||||
SkScalarSqrt((SK_Scalar1 + dot)/2))));
|
||||
#endif
|
||||
|
||||
fOuter.quadTo( pts[1].fX + normalB.fX, pts[1].fY + normalB.fY,
|
||||
pts[2].fX + normalBC->fX, pts[2].fY + normalBC->fY);
|
||||
|
|
Загрузка…
Ссылка в новой задаче