-
-
Notifications
You must be signed in to change notification settings - Fork 127
Expand file tree
/
Copy pathDrawerOptions.cs
More file actions
59 lines (47 loc) · 1.88 KB
/
DrawerOptions.cs
File metadata and controls
59 lines (47 loc) · 1.88 KB
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
using SkiaSharp;
using System;
namespace BinaryKits.Zpl.Viewer.ElementDrawers
{
public class DrawerOptions
{
[Obsolete("Use FontManager.FontLoader instead.")]
public Func<string, SKTypeface> FontLoader {
get => FontManager.FontLoader;
set => FontManager.FontLoader = value;
}
/// <summary>
/// Gets or sets the image format used when rendering output.
/// </summary>
public SKEncodedImageFormat RenderFormat { get; set; } = SKEncodedImageFormat.Png;
/// <summary>
/// Gets or sets the quality level used when rendering images in formats that support lossy compression.
/// </summary>
public int RenderQuality { get; set; } = 80;
/// <summary>
/// Applies label over a white background after rendering all elements
/// </summary>
public bool OpaqueBackground { get; set; } = false;
/// <summary>
/// Renders the label as pdf
/// </summary>
public bool PdfOutput { get; set; } = false;
/// <summary>
/// Gets or sets a value indicating whether dashes should be replaced with en dash.
/// </summary>
public bool ReplaceDashWithEnDash { get; set; } = true;
/// <summary>
/// Gets or sets a value indicating whether underscores in text should be replaced with en space.
/// </summary>
public bool ReplaceUnderscoreWithEnSpace { get; set; } = false;
/// <summary>
/// Gets or sets a value indicating whether antialiasing is enabled.
/// </summary>
public bool Antialias { get; set; } = true;
public FontManager FontManager { get; private set; }
public DrawerOptions() : this(new FontManager()) { }
public DrawerOptions(FontManager fontManager)
{
this.FontManager = fontManager;
}
}
}