| | | 1 | | namespace Imagini.Fonts |
| | | 2 | | { |
| | | 3 | | /// <summary> |
| | | 4 | | /// Font drawing options which control the text rendering process. |
| | | 5 | | /// </summary> |
| | | 6 | | public struct FontDrawingOptions |
| | | 7 | | { |
| | | 8 | | /// <summary> |
| | | 9 | | /// Font scale. |
| | | 10 | | /// </summary> |
| | 31 | 11 | | public float Scale { get; set; } |
| | | 12 | | /// <summary> |
| | | 13 | | /// Letter spacing (in pixels). Will be multiplied by the specified scale. |
| | | 14 | | /// </summary> |
| | 19 | 15 | | public int LetterSpacing { get; set; } |
| | | 16 | | |
| | | 17 | | /// <summary> |
| | | 18 | | /// Default font drawing options. |
| | | 19 | | /// </summary> |
| | 0 | 20 | | public static FontDrawingOptions Default = |
| | 0 | 21 | | new FontDrawingOptions() |
| | 1 | 22 | | { |
| | 0 | 23 | | Scale = 1.0f, |
| | 0 | 24 | | LetterSpacing = 0 |
| | 0 | 25 | | }; |
| | | 26 | | |
| | | 27 | | /// <summary> |
| | | 28 | | /// Creates a FontDrawingOptions object with specified parameters. |
| | | 29 | | /// </summary> |
| | | 30 | | public FontDrawingOptions(float scale = 1.0f, int spacing = 0) => |
| | 6 | 31 | | (Scale, LetterSpacing) = (scale, spacing); |
| | | 32 | | } |
| | | 33 | | } |