Added Android and iOS implementations
This commit is contained in:
Родитель
5dda528c4c
Коммит
53d75ef828
|
@ -123,14 +123,16 @@ namespace Microsoft.Maui.Graphics.Platform
|
|||
|
||||
if (scaledStrokeSize == 1)
|
||||
{
|
||||
StrokePaint.SetPathEffect(new DashPathEffect(pattern, 0));
|
||||
StrokePaint.SetPathEffect(new DashPathEffect(pattern, strokeDashOffset));
|
||||
}
|
||||
else
|
||||
{
|
||||
var scaledPattern = new float[pattern.Length];
|
||||
for (int i = 0; i < pattern.Length; i++)
|
||||
scaledPattern[i] = pattern[i] * scaledStrokeSize;
|
||||
StrokePaint.SetPathEffect(new DashPathEffect(scaledPattern, 0));
|
||||
|
||||
var scaledStrokeDashOffset = strokeDashOffset * scaledStrokeSize;
|
||||
StrokePaint.SetPathEffect(new DashPathEffect(scaledPattern, scaledStrokeDashOffset));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -299,7 +299,9 @@ namespace Microsoft.Maui.Graphics.Platform
|
|||
actualDashPattern[i] = strokePattern[i] * actualStrokeSize;
|
||||
}
|
||||
|
||||
_context.SetLineDash(0, actualDashPattern, actualDashPattern.Length);
|
||||
var actualDashOffset = strokeDashOffset * actualStrokeSize;
|
||||
|
||||
_context.SetLineDash(actualDashOffset, actualDashPattern, actualDashPattern.Length);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче