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
|
2021-07-29 15:22:51 +12:00
|
|
|
|
Copyright (c) 2007-2021 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)
|
|
|
|
|
|
2020-07-06 11:23:59 +12:00
|
|
|
|
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);
|
2016-12-01 04:17:12 +13:00
|
|
|
|
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;
|
|
|
|
|
|
2016-05-21 08:19:07 +12:00
|
|
|
|
// Drawing
|
2016-12-01 04:17:12 +13:00
|
|
|
|
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;
|
2016-12-01 04:17:12 +13:00
|
|
|
|
public Color FillColor { get; set; } = TransparentColor;
|
|
|
|
|
public int DrawingCornerRadius { get; set; } = 3;
|
2016-11-30 10:11:39 +13:00
|
|
|
|
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);
|
2016-05-21 08:19:07 +12:00
|
|
|
|
|
2017-08-03 03:32:51 +12:00
|
|
|
|
// Line, arrow drawing
|
|
|
|
|
public int LineCenterPointCount { get; set; } = 1;
|
|
|
|
|
|
2017-08-03 04:11:12 +12:00
|
|
|
|
// Arrow drawing
|
2020-10-06 14:26:29 +13:00
|
|
|
|
public ArrowHeadDirection ArrowHeadDirection { get; set; } = ArrowHeadDirection.End;
|
2017-08-03 04:11:12 +12:00
|
|
|
|
|
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
|
|
|
|
|
};
|
2016-12-01 04:17:12 +13:00
|
|
|
|
public Color TextBorderColor { get; set; } = SecondaryColor;
|
2017-06-16 22:30:38 +12:00
|
|
|
|
public int TextBorderSize { get; set; } = 0;
|
2016-12-01 04:17:12 +13:00
|
|
|
|
public Color TextFillColor { get; set; } = PrimaryColor;
|
2016-05-21 08:19:07 +12:00
|
|
|
|
|
2018-01-06 18:30:04 +13:00
|
|
|
|
// Image drawing
|
2020-07-06 11:23:59 +12:00
|
|
|
|
public ImageInterpolationMode ImageInterpolationMode = ImageInterpolationMode.NearestNeighbor;
|
2018-02-22 23:27:54 +13:00
|
|
|
|
public string LastImageFilePath { get; set; }
|
2018-01-06 18:30:04 +13:00
|
|
|
|
|
2016-05-24 03:31:22 +12:00
|
|
|
|
// Step drawing
|
2016-12-01 04:17:12 +13:00
|
|
|
|
public Color StepBorderColor { get; set; } = SecondaryColor;
|
2017-06-16 22:30:38 +12:00
|
|
|
|
public int StepBorderSize { get; set; } = 0;
|
2016-12-01 04:17:12 +13:00
|
|
|
|
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
|
2018-03-17 08:58:51 +13:00
|
|
|
|
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;
|
2018-02-22 12:11:18 +13:00
|
|
|
|
public string LastStickerPath { get; set; }
|
2018-02-06 22:39:42 +13:00
|
|
|
|
|
2016-05-21 08:19:07 +12:00
|
|
|
|
// Blur effect
|
2018-09-17 06:44:46 +12:00
|
|
|
|
public int BlurRadius { get; set; } = 35;
|
2016-05-21 08:19:07 +12:00
|
|
|
|
|
|
|
|
|
// Pixelate effect
|
2018-09-17 06:44:46 +12:00
|
|
|
|
public int PixelateSize { get; set; } = 15;
|
2016-05-21 08:19:07 +12:00
|
|
|
|
|
|
|
|
|
// Highlight effect
|
2016-05-21 05:34:45 +12:00
|
|
|
|
public Color HighlightColor { get; set; } = Color.Yellow;
|
|
|
|
|
}
|
|
|
|
|
}
|