예제 #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;
예제 #4
0
 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
파일: Bitmap.cs 프로젝트: sqdavid/Avalonia
 /// <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));
     }
 }