Fix strokeDasharray handling of odd number of length values and the 'none' value.

This commit is contained in:
Mikael Sand
2017-07-25 21:58:07 +03:00
parent 48cfe71aca
commit 54efe3ad1e
2 changed files with 13 additions and 8 deletions
@@ -134,7 +134,7 @@ class TSpanShadowNode extends TextShadowNode {
if (distance == 0) {
return path;
}
offset += getAbsoluteStartOffset(distance, gc.getFontSize(), textPath.getStartOffset());
offset += getAbsoluteStartOffset(textPath.getStartOffset(), distance, gc.getFontSize());
/*
TextPathSpacing spacing = textPath.getSpacing();
if (spacing == TextPathSpacing.auto) {
@@ -440,8 +440,8 @@ class TSpanShadowNode extends TextShadowNode {
return 1;
}
private double getAbsoluteStartOffset(double distance, double size, String startOffset) {
return PropHelper.fromRelative(startOffset, distance, 0, mScale, size);
private double getAbsoluteStartOffset(String startOffset, double distance, double fontSize) {
return PropHelper.fromRelative(startOffset, distance, 0, mScale, fontSize);
}
private double getTextAnchorOffset(TextAnchor textAnchor, double textMeasure) {