Skip to content

Commit

Permalink
Update SvgSource.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
wieslawsoltes committed Mar 27, 2024
1 parent 88a18e5 commit dbe4661
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions src/Avalonia.Svg.Skia/SvgSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ static SvgSource()
return null;
}

public static SKPicture? FromSvgDocument(SvgDocument? svgDocument)
private static SKPicture? FromSvgDocument(SvgDocument? svgDocument)
{
if (svgDocument is { })
{
Expand Down Expand Up @@ -226,26 +226,6 @@ static SvgSource()
return source;
}

public void ReLoad(SvgParameters? parameters)
{
lock (Sync)
{
_picture = null;

_originalParameters = parameters;

if (_originalStream == null)
{
_picture = Load(this, _originalPath, parameters);
return;
}

_originalStream.Position = 0;

_picture = Load(this, _originalStream, parameters);
}
}

/// <summary>
/// Loads svg source from svg source.
/// </summary>
Expand Down Expand Up @@ -282,4 +262,24 @@ public void ReLoad(SvgParameters? parameters)
source._picture = FromSvgDocument(document);
return source;
}

public void ReLoad(SvgParameters? parameters)
{
lock (Sync)
{
_picture = null;

_originalParameters = parameters;

if (_originalStream == null)
{
_picture = Load(this, _originalPath, parameters);
return;
}

_originalStream.Position = 0;

_picture = Load(this, _originalStream, parameters);
}
}
}

0 comments on commit dbe4661

Please sign in to comment.