XPrintServer/XPrintServer.Api/Dto/ScaleRequestInfo.cs
2025-11-16 19:33:01 +08:00

67 lines
2.0 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
namespace XPrintServer.Api.Dto
{
public class ScaleRequestInfo
{
public ScaleRequestInfo() { }
//[JsonPropertyName("prompt")]
//public string Prompt { get; set; } = string.Empty;
[JsonPropertyName("fileNames")]
public string[] FileNames { get; set; } = Array.Empty<string>();
/// <summary>
/// 取值范围:(0,1]向上扩展比例暂定最大扩展单边1倍可选
/// 默认值0.1
/// </summary>
[Range(0f, 1f)]
[JsonPropertyName("top")]
public string Top { get; set; } = "0.1";
/// <summary>
/// 取值范围:(0,1]向下扩展比例暂定最大扩展单边1倍可选
/// 默认值0.1
/// </summary>
[Range(0f, 1f)]
[JsonPropertyName("bottom")]
public string Bottom { get; set; } = "0.1";
/// <summary>
/// 取值范围:(0,1]向左扩展比例暂定最大扩展单边1倍可选
/// 默认值0.1
/// </summary>
[Range(0f, 1f)]
[JsonPropertyName("left")]
public string Left { get; set; } = "0.1";
/// <summary>
/// 取值范围:(0,1]向右扩展比例暂定最大扩展单边1倍可选
/// 默认值0.1
/// </summary>
[Range(0f, 1f)]
[JsonPropertyName("right")]
public string Right { get; set; } = "0.1";
/// <summary>
/// 最大输出高度(可选)
/// 默认值1920在扩图处理后resize到指定尺寸进行兜底
/// </summary>
[JsonPropertyName("max_height")]
public int MaxHeight { get; set; } = 1920;
/// <summary>
/// 最大输出宽度(可选)
/// 默认值1920在扩图处理后resize到指定尺寸进行兜底
/// </summary>
[JsonPropertyName("max_width")]
public int MaxWidth { get; set; } = 1920;
}
}