ShareX/ShareX.ScreenCaptureLib/Shapes/AnnotationOptions.cs

115 lines
4.4 KiB
C#
Raw Normal View History

2016-05-21 05:34:45 +12:00
#region License Information (GPL v3)
/*
ShareX - A program that allows you to take screenshots and share any file type
2024-01-03 12:57:14 +13:00
Copyright (c) 2007-2024 ShareX Team
2016-05-21 05:34:45 +12:00
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Optionally you can also view the license at <http://www.gnu.org/licenses/>.
*/
#endregion License Information (GPL v3)
using ShareX.HelpersLib;
2018-02-06 23:16:42 +13:00
using System.Collections.Generic;
2016-05-21 05:34:45 +12:00
using System.Drawing;
namespace ShareX.ScreenCaptureLib
2021-04-17 20:50:59 +12:00
{
2016-05-21 05:34:45 +12:00
public class AnnotationOptions
{
2017-02-23 02:30:51 +13:00
public static readonly string DefaultFont = "Arial";
2017-06-16 22:30:38 +12:00
public static readonly Color PrimaryColor = Color.FromArgb(242, 60, 60);
public static readonly Color SecondaryColor = Color.White;
public static readonly Color TransparentColor = Color.FromArgb(0, 0, 0, 0);
// Region
public int RegionCornerRadius { get; set; } = 0;
// Drawing
public Color BorderColor { get; set; } = PrimaryColor;
2017-06-16 22:30:38 +12:00
public int BorderSize { get; set; } = 4;
2020-12-06 12:05:36 +13:00
public BorderStyle BorderStyle { get; set; } = BorderStyle.Solid;
public Color FillColor { get; set; } = TransparentColor;
public int DrawingCornerRadius { get; set; } = 3;
public bool Shadow { get; set; } = true;
2018-01-31 06:14:28 +13:00
public Color ShadowColor { get; set; } = Color.FromArgb(125, 0, 0, 0);
public Point ShadowOffset { get; set; } = new Point(0, 1);
2017-08-03 03:32:51 +12:00
// Line, arrow drawing
public int LineCenterPointCount { get; set; } = 1;
// Arrow drawing
2020-10-06 14:26:29 +13:00
public ArrowHeadDirection ArrowHeadDirection { get; set; } = ArrowHeadDirection.End;
2017-02-16 13:49:13 +13:00
// Text (Outline) drawing
public TextDrawingOptions TextOutlineOptions { get; set; } = new TextDrawingOptions()
{
2017-06-16 22:30:38 +12:00
Color = SecondaryColor,
2017-02-23 01:59:52 +13:00
Size = 25,
2017-02-16 13:49:13 +13:00
Bold = true
};
2017-06-16 22:30:38 +12:00
public Color TextOutlineBorderColor { get; set; } = PrimaryColor;
public int TextOutlineBorderSize { get; set; } = 5;
2017-02-16 13:49:13 +13:00
// Text (Background) drawing
public TextDrawingOptions TextOptions { get; set; } = new TextDrawingOptions()
{
Color = SecondaryColor,
Size = 18
};
public Color TextBorderColor { get; set; } = SecondaryColor;
2017-06-16 22:30:38 +12:00
public int TextBorderSize { get; set; } = 0;
public Color TextFillColor { get; set; } = PrimaryColor;
// Image drawing
public ImageInterpolationMode ImageInterpolationMode = ImageInterpolationMode.NearestNeighbor;
public string LastImageFilePath { get; set; }
2016-05-24 03:31:22 +12:00
// Step drawing
public Color StepBorderColor { get; set; } = SecondaryColor;
2017-06-16 22:30:38 +12:00
public int StepBorderSize { get; set; } = 0;
public Color StepFillColor { get; set; } = PrimaryColor;
2017-12-08 09:21:55 +13:00
public int StepFontSize { get; set; } = 18;
2021-04-17 20:50:59 +12:00
public StepType StepType { get; set; } = StepType.Numbers;
2016-05-24 03:31:22 +12:00
2019-05-03 19:40:54 +12:00
// Magnify drawing
public int MagnifyStrength { get; set; } = 200;
2018-02-06 22:39:42 +13:00
// Sticker drawing
public List<StickerPackInfo> StickerPacks = new List<StickerPackInfo>()
{
new StickerPackInfo(@"Stickers\BlobEmoji", "Blob Emoji")
};
2018-02-08 01:03:45 +13:00
public int SelectedStickerPack = 0;
2018-02-06 22:39:42 +13:00
public int StickerSize { get; set; } = 64;
public string LastStickerPath { get; set; }
2018-02-06 22:39:42 +13:00
// Blur effect
public int BlurRadius { get; set; } = 35;
// Pixelate effect
public int PixelateSize { get; set; } = 15;
// Highlight effect
2016-05-21 05:34:45 +12:00
public Color HighlightColor { get; set; } = Color.Yellow;
2022-08-18 07:46:45 +12:00
2022-08-19 02:27:18 +12:00
// Cut out tool
2022-08-18 07:46:45 +12:00
public CutOutEffectType CutOutEffectType { get; set; } = CutOutEffectType.None;
2022-08-19 02:27:18 +12:00
public int CutOutEffectSize { get; set; } = 10;
2024-04-13 09:12:31 +12:00
public Color CutOutBackgroundColor { get; set; } = Color.Transparent;
2016-05-21 05:34:45 +12:00
}
}