mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 23:38:38 +09:00
Don't trust convexity when applying transforms.
In theory, a convex shape transformed by an affine matrix should still be convex. However, due to numerical imprecision of floats, when we try to determine if something is convex, we can get different answers pre and post a transformation (think of two line segments nearly co-linear). Convex paths take a faster scan converter, but it is only well behaved if the path is, in fact, convex. Thus we have to be conservative about which paths we mark as convex, and cant's trust transformed paths to retain their convexity. We re-calculate when a transform is applied.
This commit is contained in:
parent
32c0424845
commit
c9ecf8e87b
1 changed files with 1 additions and 1 deletions
|
|
@ -1744,7 +1744,7 @@ void SkPath::transform(const SkMatrix& matrix, SkPath* dst) const {
|
|||
|
||||
if (this != dst) {
|
||||
dst->fFillType = fFillType;
|
||||
dst->fConvexity = fConvexity;
|
||||
dst->fConvexity = kUnknown_Convexity;
|
||||
dst->fIsVolatile = fIsVolatile;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue