Update GridDrawNode.cs
This commit is contained in:
Родитель
13ce0fe50b
Коммит
b42a480826
|
@ -60,14 +60,23 @@ internal class GridDrawNode : DrawNode, IGridDrawNode
|
|||
thickness /= zoom;
|
||||
}
|
||||
|
||||
// ReSharper disable once CompareOfFloatsByEqualityOperator
|
||||
if (scale != 1.0)
|
||||
{
|
||||
thickness /= scale;
|
||||
}
|
||||
|
||||
// ReSharper disable once CompareOfFloatsByEqualityOperator
|
||||
if (Stroke is { } && Stroke.Thickness != thickness)
|
||||
{
|
||||
Stroke = AvaloniaDrawUtil.ToPen(Grid.GridStrokeColor, thickness);
|
||||
if (Grid.GridStrokeColor is { })
|
||||
{
|
||||
Stroke = AvaloniaDrawUtil.ToPen(Grid.GridStrokeColor, thickness);
|
||||
}
|
||||
else
|
||||
{
|
||||
Stroke = null;
|
||||
}
|
||||
}
|
||||
|
||||
OnDraw(dc, zoom);
|
||||
|
|
Загрузка…
Ссылка в новой задаче