Browse Source

set from float to double

pull/5683/head
Jumar Macato 5 years ago
parent
commit
74a74acf0c
No known key found for this signature in database GPG Key ID: B19884DAC3A5BF3F
  1. 2
      src/Avalonia.Headless/HeadlessPlatformRenderInterface.cs
  2. 2
      src/Avalonia.Visuals/Platform/IGeometryImpl.cs
  3. 4
      src/Skia/Avalonia.Skia/GeometryImpl.cs
  4. 2
      src/Windows/Avalonia.Direct2D1/Media/GeometryImpl.cs
  5. 2
      tests/Avalonia.UnitTests/MockStreamGeometryImpl.cs
  6. 2
      tests/Avalonia.Visuals.UnitTests/VisualTree/MockRenderInterface.cs

2
src/Avalonia.Headless/HeadlessPlatformRenderInterface.cs

@ -143,7 +143,7 @@ namespace Avalonia.Headless
return false; return false;
} }
public bool TryGetSegment(float startDistance, float stopDistance, bool startOnBeginFigure, out IGeometryImpl segmentGeometry) public bool TryGetSegment(double startDistance, double stopDistance, bool startOnBeginFigure, out IGeometryImpl segmentGeometry)
{ {
segmentGeometry = null; segmentGeometry = null;
return false; return false;

2
src/Avalonia.Visuals/Platform/IGeometryImpl.cs

@ -85,6 +85,6 @@ namespace Avalonia.Platform
/// <param name="startOnBeginFigure">If ture, the resulting snipped path will start with a BeginFigure call.</param> /// <param name="startOnBeginFigure">If ture, the resulting snipped path will start with a BeginFigure call.</param>
/// <param name="segmentGeometry">The resulting snipped path.</param> /// <param name="segmentGeometry">The resulting snipped path.</param>
/// <returns>If the snipping operation is successful.</returns> /// <returns>If the snipping operation is successful.</returns>
bool TryGetSegment (float startDistance, float stopDistance, bool startOnBeginFigure, out IGeometryImpl segmentGeometry); bool TryGetSegment (double startDistance, double stopDistance, bool startOnBeginFigure, out IGeometryImpl segmentGeometry);
} }
} }

4
src/Skia/Avalonia.Skia/GeometryImpl.cs

@ -163,7 +163,7 @@ namespace Avalonia.Skia
return res; return res;
} }
public bool TryGetSegment(float startDistance, float stopDistance, bool startOnBeginFigure, public bool TryGetSegment(double startDistance, double stopDistance, bool startOnBeginFigure,
out IGeometryImpl segmentGeometry) out IGeometryImpl segmentGeometry)
{ {
if (EffectivePath is null) if (EffectivePath is null)
@ -181,7 +181,7 @@ namespace Avalonia.Skia
SKPath _skPathSegment = null; SKPath _skPathSegment = null;
var res = _pathMeasureCache.GetSegment(startDistance, stopDistance, _skPathSegment, startOnBeginFigure); var res = _pathMeasureCache.GetSegment((float)startDistance, (float)stopDistance, _skPathSegment, startOnBeginFigure);
if (res) if (res)
{ {

2
src/Windows/Avalonia.Direct2D1/Media/GeometryImpl.cs

@ -82,7 +82,7 @@ namespace Avalonia.Direct2D1.Media
return false; return false;
} }
public bool TryGetSegment(float startDistance, float stopDistance, bool startOnBeginFigure, out IGeometryImpl segmentGeometry) public bool TryGetSegment(double startDistance, double stopDistance, bool startOnBeginFigure, out IGeometryImpl segmentGeometry)
{ {
// Direct2D doesnt have this too sadly. // Direct2D doesnt have this too sadly.
Logger.TryGet(LogEventLevel.Warning, LogArea.Visual)?.Log(this, "TryGetSegment is not available in Direct2D."); Logger.TryGet(LogEventLevel.Warning, LogArea.Visual)?.Log(this, "TryGetSegment is not available in Direct2D.");

2
tests/Avalonia.UnitTests/MockStreamGeometryImpl.cs

@ -84,7 +84,7 @@ namespace Avalonia.UnitTests
return false; return false;
} }
public bool TryGetSegment(float startDistance, float stopDistance, bool startOnBeginFigure, out IGeometryImpl segmentGeometry) public bool TryGetSegment(double startDistance, double stopDistance, bool startOnBeginFigure, out IGeometryImpl segmentGeometry)
{ {
segmentGeometry = null; segmentGeometry = null;
return false; return false;

2
tests/Avalonia.Visuals.UnitTests/VisualTree/MockRenderInterface.cs

@ -163,7 +163,7 @@ namespace Avalonia.Visuals.UnitTests.VisualTree
throw new NotImplementedException(); throw new NotImplementedException();
} }
public bool TryGetSegment(float startDistance, float stopDistance, bool startOnBeginFigure, out IGeometryImpl segmentGeometry) public bool TryGetSegment(double startDistance, double stopDistance, bool startOnBeginFigure, out IGeometryImpl segmentGeometry)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }

Loading…
Cancel
Save