2022-01-26 11:07:48 -06:00
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
|
|
namespace ElectronNET.API.Entities
|
2020-05-06 19:05:21 -04:00
|
|
|
|
{
|
2020-05-06 19:14:34 -04:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
///
|
|
|
|
|
|
/// </summary>
|
2022-01-26 11:07:48 -06:00
|
|
|
|
[Obsolete("Use CreateOptions instead")]
|
2020-05-06 19:05:21 -04:00
|
|
|
|
public class CreateFromBitmapOptions
|
|
|
|
|
|
{
|
2020-05-06 19:14:34 -04:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets or sets the width
|
|
|
|
|
|
/// </summary>
|
2020-05-06 19:05:21 -04:00
|
|
|
|
public int? Width { get; set; }
|
2020-05-06 19:14:34 -04:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets or sets the height
|
|
|
|
|
|
/// </summary>
|
2020-05-06 19:05:21 -04:00
|
|
|
|
public int? Height { get; set; }
|
2020-05-06 19:14:34 -04:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets or sets the scalefactor
|
|
|
|
|
|
/// </summary>
|
2022-01-26 11:07:48 -06:00
|
|
|
|
public float ScaleFactor { get; set; } = NativeImage.DefaultScaleFactor;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Utility conversion for obsolete class
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public static implicit operator CreateOptions(CreateFromBitmapOptions o) => new()
|
|
|
|
|
|
{Width = o.Width, Height = o.Height, ScaleFactor = o.ScaleFactor};
|
2020-05-06 19:05:21 -04:00
|
|
|
|
}
|
|
|
|
|
|
}
|