示例#1
0
 public IWindowIconImpl LoadIcon(IBitmapImpl bitmap)
 {
     using (var stream = new MemoryStream())
     {
         bitmap.Save(stream);
         return LoadIcon(stream);
     }
 }
 public ICursorImpl CreateCursor(IBitmapImpl cursor, PixelPoint hotSpot) => new NullCursorImpl();
示例#3
0
 public ICursorImpl CreateCursor(IBitmapImpl cursor, PixelPoint hotSpot) => CursorImpl.ZeroCursor;
 public IWindowIconImpl LoadIcon(IBitmapImpl bitmap)
 {
     return(new IconStub());
 }
 /// <inheritdoc/>
 public void DrawImage(IBitmapImpl source, IBrush opacityMask, Rect opacityMaskRect, Rect sourceRect)
 {
     // This method is currently only used to composite layers so shouldn't be called here.
     throw new NotSupportedException();
 }
示例#6
0
 public ICursorImpl CreateCursor(IBitmapImpl cursor, PixelPoint hotSpot)
 {
     return(new MockCursorImpl());
 }
示例#7
0
 /// <inheritdoc />
 public IBitmapImpl ResizeBitmap(IBitmapImpl bitmapImpl, PixelSize destinationSize, BitmapInterpolationMode interpolationMode = BitmapInterpolationMode.HighQuality)
 {
     // https://github.com/sharpdx/SharpDX/issues/959 blocks implementation.
     throw new NotImplementedException();
 }
示例#8
0
 public ICursorImpl CreateCursor(IBitmapImpl cursor, PixelPoint hotSpot) => new CursorStub();
示例#9
0
文件: Stubs.cs 项目: x2bool/Avalonia
 public IconStub(IBitmapImpl bitmap)
 {
     _bitmap = bitmap;
 }
示例#10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Bitmap"/> class.
 /// </summary>
 /// <param name="impl">A platform-specific bitmap implementation. Bitmap class takes the ownership.</param>
 protected Bitmap(IBitmapImpl impl)
 {
     PlatformImpl = RefCountable.Create(impl);
 }
示例#11
0
 public IBitmapImpl ResizeBitmap(IBitmapImpl bitmapImpl, PixelSize destinationSize, BitmapInterpolationMode interpolationMode = BitmapInterpolationMode.HighQuality)
 {
     throw new NotImplementedException();
 }
示例#12
0
 public IWindowIconImpl LoadIcon(IBitmapImpl bitmap)
 {
     return(null);
 }
示例#13
0
 private SdBitmap LoadSystemDrawingBitmap(IBitmapImpl bitmap)
 {
     using var memoryStream = new MemoryStream();
     bitmap.Save(memoryStream);
     return(new SdBitmap(memoryStream));
 }
示例#14
0
 public IWindowIconImpl LoadIcon(IBitmapImpl bitmap)
 {
     return null;
 }
示例#15
0
 public IBitmapImpl ResizeBitmap(IBitmapImpl bitmapImpl, PixelSize destinationSize, BitmapInterpolationMode interpolationMode = BitmapInterpolationMode.HighQuality)
 {
     return(Mock.Of <IBitmapImpl>());
 }
示例#16
0
 public void DrawImage(IBitmapImpl source, IBrush opacityMask, Rect opacityMaskRect, Rect destRect)
 {
     PushOpacityMask(opacityMask, opacityMaskRect);
     DrawImage(source, 1, new Rect(0, 0, source.PixelWidth, source.PixelHeight), destRect);
     PopOpacityMask();
 }
 public IBitmapImpl ResizeBitmap(IBitmapImpl bitmapImpl, PixelSize destinationSize, BitmapInterpolationMode interpolationMode = BitmapInterpolationMode.HighQuality)
 {
     return(new HeadlessBitmapStub(destinationSize, new Vector(96, 96)));
 }
示例#18
0
 public unsafe ICursorImpl CreateCursor(IBitmapImpl cursor, PixelPoint hotSpot)
 {
     return(new XImageCursor(_display, cursor, hotSpot));
 }
示例#19
0
 public IWindowIconImpl LoadIcon(IBitmapImpl bitmap) => new IconStub();
示例#20
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Bitmap"/> class.
 /// </summary>
 /// <param name="impl">A platform-specific bitmap implementation.</param>
 protected Bitmap(IBitmapImpl impl)
 {
     PlatformImpl = impl;
 }
示例#21
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Bitmap"/> class.
 /// </summary>
 /// <param name="impl">A platform-specific bitmap implementation.</param>
 protected Bitmap(IBitmapImpl impl)
 {
     PlatformImpl = impl;
 }
示例#22
0
 public IWindowIconImpl LoadIcon(IBitmapImpl bitmap)
 {
     using (var memoryStream = new MemoryStream())
     {
         bitmap.Save(memoryStream);
         return new IconImpl(new System.Drawing.Bitmap(memoryStream));
     }
 }