using System; using System.Collections.Generic; using System.IO; using Avalonia.Media; using Avalonia.Platform; using Moq; namespace Avalonia.UnitTests { public class MockPlatformRenderInterface : IPlatformRenderInterface { public IFormattedTextImpl CreateFormattedText( string text, Typeface typeface, TextAlignment textAlignment, TextWrapping wrapping, Size constraint, IReadOnlyList spans) { return Mock.Of(); } public IRenderTarget CreateRenderTarget(IEnumerable surfaces) { return Mock.Of(); } public IRenderTargetBitmapImpl CreateRenderTargetBitmap( int width, int height, double dpiX, double dpiY) { return Mock.Of(); } public IStreamGeometryImpl CreateStreamGeometry() { return new MockStreamGeometryImpl(); } public IWriteableBitmapImpl CreateWriteableBitmap(int width, int height, PixelFormat? format = default(PixelFormat?)) { throw new NotImplementedException(); } public IBitmapImpl LoadBitmap(Stream stream) { return Mock.Of(); } public IBitmapImpl LoadBitmap(string fileName) { return Mock.Of(); } public IBitmapImpl LoadBitmap(PixelFormat format, IntPtr data, int width, int height, int stride) { throw new NotImplementedException(); } } }