Closed jzbrooks closed 2 weeks ago
742069174a9ffb7fecfdd713dab789085c8af0a2 somehow seems to have addressed this particular issue, but I'm not totally sure why yet.
with that commit reverted, this registry (modified to only include the absolutely necessary transformations to run ConvertCurvesToArcs
and left bottom up commands that are irrelevant to this graphic) reproduces the issue. Commenting out ConvertCurvesToArcs
restores expected (non-broken) visuals.
class VectorDrawableOptimizationRegistry : OptimizationRegistry(BOTTOM_UP, TOP_DOWN) {
companion object {
private val BOTTOM_UP =
listOf(
// BakeTransformations(),
CollapseGroups(),
RemoveEmptyGroups(),
// MergePaths(),
)
private val TOP_DOWN =
listOf(
BreakoutImplicitCommands(),
CommandVariant(CommandVariant.Mode.Relative),
ConvertCurvesToArcs(VectorDrawableCommandPrinter(3)),
// SimplifyBezierCurveCommands(1e-3f),
// RemoveRedundantCommands(),
// CommandVariant(CommandVariant.Mode.Compact(VectorDrawableCommandPrinter(3))),
// Polycommands(),
)
}
}
With the above modification to the registry, the data in the zip appears to be a simpler repro where the path first goes wrong.
Describe the bug The image below is distorted by vgo as of 4a6b49ce44166648d561b75bc5ea1c2b5162b3ca. When
ConvertCurvesToArcs
is disabled, no distortion occurs.To Reproduce View the vector drawable below (https://shapeshifter.design is handy) Run
vgo --indent 2
against the vector (saving it into a different file with-o
probably makes sense. Compare the output with the sourceExpected behavior The image should not be distorted
Screenshots Before / After
Additional context