mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-08 21:26:52 +00:00
Breaking Changes: * `System.Drawing.Common` is dropped and `SixLabors.ImageSharp` is introduced. * uses of `NativeImage.CreateFromBitmap(bitmap, options);` is no longer supported, will cause failed builds. Unexpected Behaviors: * uses ToDataUrl will always create png data urls, unexpected output may happen for those that manipulate this output expecting a different data url format. Obsoletions: * `CreateFromBitmapOptions` & `CreateFromBufferOptions` have been consolidated into `CreateOptions`. Implicit conversions added to ease transition. * `ToBitmapOptions`, `ToDataUrlOptions`, `ToPngOptions` & `BitmapOptions` have been consolidated into `ImageOptions`. Implicit conversions added to ease transition.
21 lines
567 B
C#
21 lines
567 B
C#
using System;
|
|
|
|
namespace ElectronNET.API.Entities
|
|
{
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
[Obsolete("Use ImageOptions instead.")]
|
|
public class ToBitmapOptions
|
|
{
|
|
/// <summary>
|
|
/// Gets or sets the scalefactor
|
|
/// </summary>
|
|
public float ScaleFactor { get; set; } = NativeImage.DefaultScaleFactor;
|
|
/// <summary>
|
|
/// Utility conversion for obsolete class
|
|
/// </summary>
|
|
public static implicit operator ImageOptions(ToBitmapOptions o) => new () {ScaleFactor = o.ScaleFactor};
|
|
}
|
|
}
|