-
Notifications
You must be signed in to change notification settings - Fork 0
/
ImageInput.cs
103 lines (85 loc) · 3.3 KB
/
ImageInput.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Serialization;
namespace DynamicPDF.Api
{
/// <summary>
/// Represents an image input.
/// </summary>
public class ImageInput : Input
{
/// <summary>
/// Initializes a new instance of the <see cref="ImageInput"/> class.
/// </summary>
/// <param name="resource">The <see cref="ImageResource"/> object to create ImageInput.</param>
public ImageInput(ImageResource resource) : base(resource) { }
/// <summary>
/// Initializes a new instance of the <see cref="ImageInput"/> class.
/// </summary>
/// <param name="cloudResourcePath">The image file path present in cloud resource manager.</param>
public ImageInput(string cloudResourcePath) : base(cloudResourcePath) { }
[JsonProperty("type")]
[JsonConverter(typeof(StringEnumConverter), converterParameters: typeof(CamelCaseNamingStrategy))]
internal override InputType Type { get { return InputType.Image; } }
/// <summary>
/// Gets or sets the scaleX of the image.
/// </summary>
public float? ScaleX { get; set; }
/// <summary>
/// Gets or sets the scaleY of the image.
/// </summary>
public float? ScaleY { get; set; }
/// <summary>
/// Gets or sets the top margin.
/// </summary>
public float? TopMargin { get; set; }
/// <summary>
/// Gets or sets the left margin.
/// </summary>
public float? LeftMargin { get; set; }
/// <summary>
/// Gets or sets the bottom margin.
/// </summary>
public float? BottomMargin { get; set; }
/// <summary>
/// Gets or sets the right margin.
/// </summary>
public float? RightMargin { get; set; }
/// <summary>
/// Gets or sets the page width.
/// </summary>
public float? PageWidth { get; set; }
/// <summary>
/// Gets or sets the page height.
/// </summary>
public float? PageHeight { get; set; }
/// <summary>
/// Gets or sets a boolean indicating whether to expand the image.
/// </summary>
public bool? ExpandToFit { get; set; }
/// <summary>
/// Gets or sets a boolean indicating whether to shrink the image.
/// </summary>
public bool? ShrinkToFit { get; set; }
/// <summary>
/// Gets or sets the horizontal alignment of the image.
/// </summary>
[JsonProperty("align")]
[JsonConverter(typeof(StringEnumConverter), converterParameters: typeof(CamelCaseNamingStrategy))]
public Align Align { get; set; } = Align.Center;
/// <summary>
/// Gets or sets the vertical alignment of the image.
/// </summary>
[JsonProperty("vAlign")]
[JsonConverter(typeof(StringEnumConverter), converterParameters: typeof(CamelCaseNamingStrategy))]
public VAlign VAlign { get; set; } = VAlign.Center;
/// <summary>
/// Gets or sets the start page.
/// </summary>
public int? StartPage { get; set; }
/// <summary>
/// Gets or sets the page count.
/// </summary>
public int? PageCount { get; set; }
}
}