2013-11-03 23:53:49 +13:00
#region License Information ( GPL v3 )
/ *
ShareX - A program that allows you to take screenshots and share any file type
2016-01-04 04:16:01 +13:00
Copyright ( c ) 2007 - 2016 ShareX Team
2013-11-03 23:53:49 +13: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 )
2014-12-11 09:25:20 +13:00
using ShareX.HelpersLib ;
2015-08-14 07:23:51 +12:00
using System.Collections.Generic ;
2013-11-03 23:53:49 +13:00
using System.ComponentModel ;
2015-07-21 23:55:53 +12:00
using System.ComponentModel.Design ;
2013-11-03 23:53:49 +13:00
using System.Drawing ;
2015-07-21 23:55:53 +12:00
using System.Drawing.Design ;
2013-11-03 23:53:49 +13:00
2014-12-11 09:25:20 +13:00
namespace ShareX.ScreenCaptureLib
2013-11-03 23:53:49 +13:00
{
public class SurfaceOptions
{
[DefaultValue(true), Description("Allow screenshot capture as soon as the mouse is released. This disables the ability to capture multiple shapes and to move and/or resize them.")]
public bool QuickCrop { get ; set ; }
2016-01-09 10:39:36 +13:00
[DefaultValue(true), Description("Allows selection of window regions in region capture.")]
2016-01-06 04:06:02 +13:00
public bool DetectWindows { get ; set ; }
2016-01-09 10:39:36 +13:00
[DefaultValue(true), Description("If detect windows setting is chosen, this setting will also allow detecting window controls.")]
2016-01-06 04:06:02 +13:00
public bool DetectControls { get ; set ; }
2014-07-25 17:54:24 +12:00
[DefaultValue(true), Description("Show coordinate and size information.")]
2013-11-03 23:53:49 +13:00
public bool ShowInfo { get ; set ; }
2015-07-21 23:55:53 +12:00
[DefaultValue(false), Description("Allows to show your custom info text near cursor. This way you can show color info too.")]
public bool UseCustomInfoText { get ; set ; }
[ DefaultValue ( "X: $x, Y: $y\r\nR: $r, G: $g, B: $b\r\nHex: $hex" ) , Description ( "Show this custom info when color info setting is enabled. Formats: $x, $y, $r, $g, $b, $hex" ) ,
Editor ( typeof ( MultilineStringEditor ) , typeof ( UITypeEditor ) ) ]
public string CustomInfoText { get ; set ; }
2015-05-07 03:15:36 +12:00
[DefaultValue(true), Description("Show hotkeys/tips.")]
public bool ShowTips { get ; set ; }
2013-11-03 23:53:49 +13:00
[DefaultValue(true), Description("Show magnifier.")]
public bool ShowMagnifier { get ; set ; }
2015-08-08 01:36:18 +12:00
[DefaultValue(false), Description("Use square or circle shape magnifier.")]
public bool UseSquareMagnifier { get ; set ; }
2013-11-03 23:53:49 +13:00
[DefaultValue(15), Description("Number of pixels in magnifier. Must be odd number like 11, 13, 15 etc.")]
public int MagnifierPixelCount { get ; set ; }
[DefaultValue(10), Description("Size of pixels in magnifier.")]
public int MagnifierPixelSize { get ; set ; }
2015-05-08 06:25:23 +12:00
[DefaultValue(false), Description("Show screen wide crosshair.")]
2013-11-03 23:53:49 +13:00
public bool ShowCrosshair { get ; set ; }
2015-05-13 04:27:21 +12:00
[DefaultValue(true), Description("Capturing screen will dim the screen outside selected area. This may impact on the startup time of the capture process at high resolutions.")]
2014-11-18 01:55:20 +13:00
public bool UseDimming { get ; set ; }
2013-11-03 23:53:49 +13:00
[DefaultValue(false), Description("Show frames per second.")]
public bool ShowFPS { get ; set ; }
[DefaultValue(false), Description("Result image will have border around the shape(s).")]
public bool DrawBorder { get ; set ; }
[DefaultValue(1), Description("Number of pixels to move shape at each arrow key stroke.")]
public int MinMoveSpeed { get ; set ; }
2015-08-20 05:32:04 +12:00
[DefaultValue(10), Description("Number of pixels to move shape at each arrow key stroke while holding Ctrl key.")]
2013-11-03 23:53:49 +13:00
public int MaxMoveSpeed { get ; set ; }
[DefaultValue(false), Description("Fixed shape size.")]
public bool IsFixedSize { get ; set ; }
[DefaultValue(typeof(Size), "250, 250"), Description("Fixed shape size.")]
public Size FixedSize { get ; set ; }
2015-08-21 05:33:28 +12:00
[DefaultValue(20), Description("How much region size must be close to snap size for it to snap.")]
2015-08-14 07:23:51 +12:00
public int SnapDistance { get ; set ; }
2015-08-15 13:09:04 +12:00
[Description("How close to a snap size you must be for it to snap.")]
public List < SnapSize > SnapSizes { get ; set ; }
2015-08-14 07:23:51 +12:00
2016-05-06 07:09:39 +12:00
[DefaultValue(ShapeType.RegionRectangle)]
2016-05-03 21:35:10 +12:00
public ShapeType CurrentShapeType { get ; set ; } = ShapeType . RegionRectangle ;
2015-07-17 07:51:19 +12:00
2016-05-06 07:09:39 +12:00
[DefaultValue(typeof(Color), "Red")]
public Color ShapeBorderColor { get ; set ; } = Color . Red ;
[DefaultValue(2)]
public int ShapeBorderSize { get ; set ; } = 2 ;
2016-05-07 01:02:46 +12:00
[DefaultValue(typeof(Color), "0, 0, 0, 0")]
public Color ShapeFillColor { get ; set ; } = Color . FromArgb ( 0 , 0 , 0 , 0 ) ;
2016-05-06 07:09:39 +12:00
2016-05-07 02:38:49 +12:00
[DefaultValue(15)]
public float RoundedRectangleRadius { get ; set ; } = 15 ;
2013-11-03 23:53:49 +13:00
public SurfaceOptions ( )
{
this . ApplyDefaultPropertyValues ( ) ;
2015-08-14 07:23:51 +12:00
2015-08-15 13:09:04 +12:00
SnapSizes = new List < SnapSize > ( )
2015-08-14 07:23:51 +12:00
{
2015-08-23 00:41:14 +12:00
new SnapSize ( 426 , 240 ) , // 240p
new SnapSize ( 640 , 360 ) , // 360p
new SnapSize ( 854 , 480 ) , // 480p
new SnapSize ( 1280 , 720 ) , // 720p
new SnapSize ( 1920 , 1080 ) , // 1080p
new SnapSize ( 2560 , 1440 ) , // 1440p
2016-05-06 06:14:44 +12:00
new SnapSize ( 3840 , 2160 ) // 2160p
2015-08-14 07:23:51 +12:00
} ;
2013-11-03 23:53:49 +13:00
}
}
}