diff --git a/ShareX.ScreenCaptureLib/Enums.cs b/ShareX.ScreenCaptureLib/Enums.cs index 14bbe2078..9a53c0d38 100644 --- a/ShareX.ScreenCaptureLib/Enums.cs +++ b/ShareX.ScreenCaptureLib/Enums.cs @@ -140,6 +140,12 @@ public enum FFmpegPaletteUseDither public enum ShapeType { + [Description("Region: Rectangle")] + RegionRectangle, + [Description("Region: Rounded rectangle")] + RegionRoundedRectangle, + [Description("Region: Ellipse")] + RegionEllipse, [Description("Drawing: Rectangle")] DrawingRectangle, [Description("Drawing: Rounded rectangle")] @@ -149,17 +155,7 @@ public enum ShapeType [Description("Drawing: Line")] DrawingLine, [Description("Drawing: Arrow")] - DrawingArrow, - [Description("Region: Rectangle")] - RegionRectangle, - [Description("Region: Rounded rectangle")] - RegionRoundedRectangle, - [Description("Region: Ellipse")] - RegionEllipse, - [Description("Region: Triangle")] - RegionTriangle, - [Description("Region: Diamond")] - RegionDiamond + DrawingArrow } public enum RegionAnnotateMode diff --git a/ShareX.ScreenCaptureLib/Forms/RectangleRegionForm.cs b/ShareX.ScreenCaptureLib/Forms/RectangleRegionForm.cs index 05a2cefa0..073320d87 100644 --- a/ShareX.ScreenCaptureLib/Forms/RectangleRegionForm.cs +++ b/ShareX.ScreenCaptureLib/Forms/RectangleRegionForm.cs @@ -448,16 +448,18 @@ protected virtual void WriteTips(StringBuilder sb) sb.AppendLine(Resources.RectangleRegion_WriteTips__Numpad_2__Rounded_rectangle_shape); if (AreaManager.CurrentShapeType == ShapeType.RegionEllipse) sb.Append("-> "); sb.AppendLine(Resources.RectangleRegion_WriteTips__Numpad_3__Ellipse_shape); - if (AreaManager.CurrentShapeType == ShapeType.RegionTriangle) sb.Append("-> "); - sb.AppendLine(Resources.RectangleRegion_WriteTips__Numpad_4__Triangle_shape); - if (AreaManager.CurrentShapeType == ShapeType.RegionDiamond) sb.Append("-> "); - sb.AppendLine(Resources.RectangleRegion_WriteTips__Numpad_5__Diamond_shape); // TODO: Translate if (AreaManager.CurrentShapeType == ShapeType.DrawingRectangle) sb.Append("-> "); - sb.AppendLine("[Numpad 7] Rectangle drawing"); + sb.AppendLine("[Numpad 4] Rectangle drawing"); if (AreaManager.CurrentShapeType == ShapeType.DrawingRoundedRectangle) sb.Append("-> "); - sb.AppendLine("[Numpad 8] Rounded rectangle drawing"); + sb.AppendLine("[Numpad 5] Rounded rectangle drawing"); + if (AreaManager.CurrentShapeType == ShapeType.DrawingEllipse) sb.Append("-> "); + sb.AppendLine("[Numpad 6] Ellipse drawing"); + if (AreaManager.CurrentShapeType == ShapeType.DrawingLine) sb.Append("-> "); + sb.AppendLine("[Numpad 7] Line drawing"); + if (AreaManager.CurrentShapeType == ShapeType.DrawingArrow) sb.Append("-> "); + sb.AppendLine("[Numpad 8] Arrow drawing"); switch (AreaManager.CurrentShapeType) { @@ -465,9 +467,6 @@ protected virtual void WriteTips(StringBuilder sb) case ShapeType.DrawingRoundedRectangle: sb.AppendLine(Resources.RectangleRegion_WriteTips__Numpad___or____Change_rounded_rectangle_corner_radius); break; - case ShapeType.RegionTriangle: - sb.AppendLine(Resources.RectangleRegion_WriteTips__Numpad___or____Change_triangle_angle); - break; } } diff --git a/ShareX.ScreenCaptureLib/Properties/Resources.Designer.cs b/ShareX.ScreenCaptureLib/Properties/Resources.Designer.cs index b3257d39f..3b8a02c8a 100644 --- a/ShareX.ScreenCaptureLib/Properties/Resources.Designer.cs +++ b/ShareX.ScreenCaptureLib/Properties/Resources.Designer.cs @@ -428,16 +428,7 @@ internal class Resources { } /// - /// Looks up a localized string similar to [Numpad + or -] Change triangle angle. - /// - internal static string RectangleRegion_WriteTips__Numpad___or____Change_triangle_angle { - get { - return ResourceManager.GetString("RectangleRegion_WriteTips__Numpad___or____Change_triangle_angle", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to [Numpad 1] Rectangle shape. + /// Looks up a localized string similar to [Numpad 1] Rectangle region. /// internal static string RectangleRegion_WriteTips__Numpad_1__Rectangle_shape { get { @@ -446,7 +437,7 @@ internal class Resources { } /// - /// Looks up a localized string similar to [Numpad 2] Rounded rectangle shape. + /// Looks up a localized string similar to [Numpad 2] Rounded rectangle region. /// internal static string RectangleRegion_WriteTips__Numpad_2__Rounded_rectangle_shape { get { @@ -455,7 +446,7 @@ internal class Resources { } /// - /// Looks up a localized string similar to [Numpad 3] Ellipse shape. + /// Looks up a localized string similar to [Numpad 3] Ellipse region. /// internal static string RectangleRegion_WriteTips__Numpad_3__Ellipse_shape { get { @@ -463,24 +454,6 @@ internal class Resources { } } - /// - /// Looks up a localized string similar to [Numpad 4] Triangle shape. - /// - internal static string RectangleRegion_WriteTips__Numpad_4__Triangle_shape { - get { - return ResourceManager.GetString("RectangleRegion_WriteTips__Numpad_4__Triangle_shape", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to [Numpad 5] Diamond shape. - /// - internal static string RectangleRegion_WriteTips__Numpad_5__Diamond_shape { - get { - return ResourceManager.GetString("RectangleRegion_WriteTips__Numpad_5__Diamond_shape", resourceCulture); - } - } - /// /// Looks up a localized string similar to [Esc] Cancel capture. /// diff --git a/ShareX.ScreenCaptureLib/Properties/Resources.de.resx b/ShareX.ScreenCaptureLib/Properties/Resources.de.resx index 5dafeb44c..a160d6f46 100644 --- a/ShareX.ScreenCaptureLib/Properties/Resources.de.resx +++ b/ShareX.ScreenCaptureLib/Properties/Resources.de.resx @@ -236,9 +236,6 @@ Distanz: {6:0.00} px / Winkel: {7:0.00}° [Numpad + oder -] Radius der abgerundeten Rechteck Ecken ändern - - [Numpad + oder -] Dreieck Winkel ändern - [Numpad 1] Rechteckform @@ -248,12 +245,6 @@ Distanz: {6:0.00} px / Winkel: {7:0.00}° [Numpad 3] Ellipsenform - - [Numpad 4] Dreieckform - - - [Numpad 5] Diamantform - Aufnahme Stoppen diff --git a/ShareX.ScreenCaptureLib/Properties/Resources.fr.resx b/ShareX.ScreenCaptureLib/Properties/Resources.fr.resx index 23f248f81..d8140cec1 100644 --- a/ShareX.ScreenCaptureLib/Properties/Resources.fr.resx +++ b/ShareX.ScreenCaptureLib/Properties/Resources.fr.resx @@ -224,12 +224,6 @@ Distance : {6:0.00} px / Angle : {7:0.00}° [Pavé numérique 2] Forme rectangulaire arrondie - - [Pavé numérique 4] Forme triangulaire - - - [Pavé numérique 5] Forme de losange - [Ctrl + C] Copier les infos @@ -242,9 +236,6 @@ Distance : {6:0.00} px / Angle : {7:0.00}° [Suppr] Supprimer la région - - [Pavé numérique + ou -] Changer l'angle du triangle - [Maintenir clic gauche sur la sélection] Déplacer la région diff --git a/ShareX.ScreenCaptureLib/Properties/Resources.nl-NL.resx b/ShareX.ScreenCaptureLib/Properties/Resources.nl-NL.resx index 67b948e20..e5f6cb467 100644 --- a/ShareX.ScreenCaptureLib/Properties/Resources.nl-NL.resx +++ b/ShareX.ScreenCaptureLib/Properties/Resources.nl-NL.resx @@ -242,9 +242,6 @@ Afstand: {6:0.00} px / Hoek: {7:0.00}° [Numpad + of -] Pas diameter afgeronde rechthoek aan - - [Numpad + of -] Pas hoek driehoek aan - [Numpad 1] Rechthoekige vorm @@ -254,12 +251,6 @@ Afstand: {6:0.00} px / Hoek: {7:0.00}° [Numpad 3] Ellipsvorm - - [Numpad 4] Driehoekige vorm - - - [Numpad 5] Diamantvorm - [Esc] Annuleer vastleggen diff --git a/ShareX.ScreenCaptureLib/Properties/Resources.pt-BR.resx b/ShareX.ScreenCaptureLib/Properties/Resources.pt-BR.resx index 29b2e1b29..7804e3d1c 100644 --- a/ShareX.ScreenCaptureLib/Properties/Resources.pt-BR.resx +++ b/ShareX.ScreenCaptureLib/Properties/Resources.pt-BR.resx @@ -234,21 +234,12 @@ Distância: {6:0.00} px / Ângulo: {7:0.00}° [Teclado numérico 1] Formato de retângulo - - [Teclado numérico 4] Formato de triângulo - - - [Teclado numérico 5] Formato de diamante - [Teclado numérico 3] Formato de elipse [Teclado numérico 2] Formato de retângulo arredondado - - [Teclado numérico + ou -] Mudar o ângulo do triângulo - canto inferior direito diff --git a/ShareX.ScreenCaptureLib/Properties/Resources.resx b/ShareX.ScreenCaptureLib/Properties/Resources.resx index f19d253b8..98eac0484 100644 --- a/ShareX.ScreenCaptureLib/Properties/Resources.resx +++ b/ShareX.ScreenCaptureLib/Properties/Resources.resx @@ -168,10 +168,7 @@ Width: {4} px / Height: {5} px Distance: {6:0.00} px / Angle: {7:0.00}° - [Numpad 1] Rectangle shape - - - [Numpad 4] Triangle shape + [Numpad 1] Rectangle region [Delete] Remove region @@ -188,12 +185,6 @@ Distance: {6:0.00} px / Angle: {7:0.00}° [F1] Hide tips - - [Numpad 5] Diamond shape - - - [Numpad + or -] Change triangle angle - ..\Resources\Crosshair.cur;System.Byte[], mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -220,7 +211,7 @@ Distance: {6:0.00} px / Angle: {7:0.00}° [Esc] Cancel capture - [Numpad 2] Rounded rectangle shape + [Numpad 2] Rounded rectangle region Browse for ffmpeg.exe @@ -229,7 +220,7 @@ Distance: {6:0.00} px / Angle: {7:0.00}° [Double left click] [Enter] Capture regions - [Numpad 3] Ellipse shape + [Numpad 3] Ellipse region [Ctrl + C] Copy info diff --git a/ShareX.ScreenCaptureLib/Properties/Resources.ru.resx b/ShareX.ScreenCaptureLib/Properties/Resources.ru.resx index 6141e8e0f..6914cfe2a 100644 --- a/ShareX.ScreenCaptureLib/Properties/Resources.ru.resx +++ b/ShareX.ScreenCaptureLib/Properties/Resources.ru.resx @@ -257,9 +257,6 @@ [+ или - на циф. клавиатуре] Изменить радиус скругления - - [+ или - на циф. клавиатуре] Изменить угол поворота треугольника - [1 на циф. клавиатуре] Прямоугольник @@ -269,12 +266,6 @@ [3 на циф. клавиатуре] Эллипс - - [4 на циф. клавиатуре] Треугольник - - - [5 на циф. клавиатуре] Ромб - Остановить захват diff --git a/ShareX.ScreenCaptureLib/Properties/Resources.tr.resx b/ShareX.ScreenCaptureLib/Properties/Resources.tr.resx index 9aac07379..e08d1c6db 100644 --- a/ShareX.ScreenCaptureLib/Properties/Resources.tr.resx +++ b/ShareX.ScreenCaptureLib/Properties/Resources.tr.resx @@ -242,9 +242,6 @@ Mesafe: {6:0.00} px / Açı: {7:0.00}° [Tuş takımı + veya -] Yuvarlatılmış dikdörtgen kenar yarıçapını değiştir - - [Tuş takımı + veya -] Üçgen açısını değiştir - [Tuş takımı 1] Dikdörtgen şekli @@ -254,12 +251,6 @@ Mesafe: {6:0.00} px / Açı: {7:0.00}° [Tuş takımı 3] Elips şekli - - [Tuş takımı 4] Üçgen şekli - - - [Tuş takımı 5] Elmas şekli - [Esc] Yakalamayı iptal et diff --git a/ShareX.ScreenCaptureLib/Properties/Resources.vi-VN.resx b/ShareX.ScreenCaptureLib/Properties/Resources.vi-VN.resx index 5590f07d9..3dc8e5b0f 100644 --- a/ShareX.ScreenCaptureLib/Properties/Resources.vi-VN.resx +++ b/ShareX.ScreenCaptureLib/Properties/Resources.vi-VN.resx @@ -236,12 +236,6 @@ Khoảng cách: {6:0.00} px / Góc: {7:0.00}° [Numpad + hoặc -] Thay đổi độ tròn của góc ở hình chữ nhật - - [Numpad 5] Hình kim cương - - - [Numpad 4] Hình tam giác - [Numpad 3] Hình ellipse @@ -251,9 +245,6 @@ Khoảng cách: {6:0.00} px / Góc: {7:0.00}° [Numpad 1] Hình chữ nhật - - [Numpad + hoặc -] Thay đổi góc tam giác - Chụp hình chữ nhật (Đánh dấu) diff --git a/ShareX.ScreenCaptureLib/Properties/Resources.zh-CN.resx b/ShareX.ScreenCaptureLib/Properties/Resources.zh-CN.resx index 88bdb624e..d9a17f192 100644 --- a/ShareX.ScreenCaptureLib/Properties/Resources.zh-CN.resx +++ b/ShareX.ScreenCaptureLib/Properties/Resources.zh-CN.resx @@ -179,9 +179,6 @@ [小键盘1]矩形形状 - - [小键盘4]三角形状 - [Delete]删除区域 @@ -194,12 +191,6 @@ [F1]隐藏提示 - - [小键盘5]钻石形状 - - - [数字键盘+或 - ]更改三角形夹角 - [按住左键] [Insert]启动区域选择 diff --git a/ShareX.ScreenCaptureLib/RegionHelpers/AreaManager.cs b/ShareX.ScreenCaptureLib/RegionHelpers/AreaManager.cs index e215841e1..604a63432 100644 --- a/ShareX.ScreenCaptureLib/RegionHelpers/AreaManager.cs +++ b/ShareX.ScreenCaptureLib/RegionHelpers/AreaManager.cs @@ -106,8 +106,7 @@ public bool IsCurrentShapeTypeRegion { get { - return CurrentShapeType == ShapeType.RegionRectangle || CurrentShapeType == ShapeType.RegionRoundedRectangle || CurrentShapeType == ShapeType.RegionEllipse || - CurrentShapeType == ShapeType.RegionTriangle || CurrentShapeType == ShapeType.RegionDiamond; + return CurrentShapeType == ShapeType.RegionRectangle || CurrentShapeType == ShapeType.RegionRoundedRectangle || CurrentShapeType == ShapeType.RegionEllipse; } } @@ -117,7 +116,6 @@ public bool IsCurrentShapeTypeRegion public float RoundedRectangleRadius { get; set; } = 15; public int RoundedRectangleRadiusIncrement { get; set; } = 3; - public TriangleAngle TriangleAngle { get; set; } = TriangleAngle.Top; public Point CurrentPosition { get; private set; } public Point PositionOnClick { get; private set; } @@ -385,17 +383,20 @@ private void surface_KeyDown(object sender, KeyEventArgs e) ChangeCurrentShapeType(ShapeType.RegionEllipse); break; case Keys.NumPad4: - ChangeCurrentShapeType(ShapeType.RegionTriangle); - break; - case Keys.NumPad5: - ChangeCurrentShapeType(ShapeType.RegionDiamond); - break; - case Keys.NumPad7: ChangeCurrentShapeType(ShapeType.DrawingRectangle); break; - case Keys.NumPad8: + case Keys.NumPad5: ChangeCurrentShapeType(ShapeType.DrawingRoundedRectangle); break; + case Keys.NumPad6: + ChangeCurrentShapeType(ShapeType.DrawingEllipse); + break; + case Keys.NumPad7: + ChangeCurrentShapeType(ShapeType.DrawingLine); + break; + case Keys.NumPad8: + ChangeCurrentShapeType(ShapeType.DrawingArrow); + break; case Keys.Add: switch (CurrentShapeType) { @@ -403,17 +404,6 @@ private void surface_KeyDown(object sender, KeyEventArgs e) RoundedRectangleRadius += RoundedRectangleRadiusIncrement; UpdateRoundedRectangle(); break; - case ShapeType.RegionTriangle: - if (TriangleAngle == TriangleAngle.Left) - { - TriangleAngle = TriangleAngle.Top; - } - else - { - TriangleAngle++; - } - UpdateTriangle(); - break; } break; case Keys.Subtract: @@ -423,17 +413,6 @@ private void surface_KeyDown(object sender, KeyEventArgs e) RoundedRectangleRadius = Math.Max(0, RoundedRectangleRadius - RoundedRectangleRadiusIncrement); UpdateRoundedRectangle(); break; - case ShapeType.RegionTriangle: - if (TriangleAngle == TriangleAngle.Top) - { - TriangleAngle = TriangleAngle.Left; - } - else - { - TriangleAngle--; - } - UpdateTriangle(); - break; } break; } @@ -459,19 +438,6 @@ private void UpdateRoundedRectangle() } } - private void UpdateTriangle() - { - if (CurrentShape != null) - { - TriangleRegionShape triangleShape = CurrentShape as TriangleRegionShape; - - if (triangleShape != null) - { - triangleShape.Angle = TriangleAngle; - } - } - } - private void surface_KeyUp(object sender, KeyEventArgs e) { switch (e.KeyCode) @@ -711,15 +677,6 @@ public BaseShape CreateRegionShape(Rectangle rect) case ShapeType.RegionEllipse: shape = new EllipseRegionShape(); break; - case ShapeType.RegionTriangle: - shape = new TriangleRegionShape() - { - Angle = TriangleAngle - }; - break; - case ShapeType.RegionDiamond: - shape = new DiamondRegionShape(); - break; case ShapeType.DrawingRectangle: shape = new RectangleDrawingShape(); break; diff --git a/ShareX.ScreenCaptureLib/Shapes/Region/DiamondRegionShape.cs b/ShareX.ScreenCaptureLib/Shapes/Region/DiamondRegionShape.cs deleted file mode 100644 index b965b0e49..000000000 --- a/ShareX.ScreenCaptureLib/Shapes/Region/DiamondRegionShape.cs +++ /dev/null @@ -1,45 +0,0 @@ -#region License Information (GPL v3) - -/* - ShareX - A program that allows you to take screenshots and share any file type - Copyright (c) 2007-2016 ShareX Team - - 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 . -*/ - -#endregion License Information (GPL v3) - -using ShareX.HelpersLib; -using System; -using System.Collections.Generic; -using System.Drawing; -using System.Drawing.Drawing2D; -using System.Linq; -using System.Text; - -namespace ShareX.ScreenCaptureLib -{ - public class DiamondRegionShape : BaseRegionShape - { - public override ShapeType ShapeType { get; } = ShapeType.RegionDiamond; - - public override void AddShapePath(GraphicsPath gp, Rectangle rect) - { - gp.AddDiamond(rect); - } - } -} \ No newline at end of file diff --git a/ShareX.ScreenCaptureLib/Shapes/Region/TriangleRegionShape.cs b/ShareX.ScreenCaptureLib/Shapes/Region/TriangleRegionShape.cs deleted file mode 100644 index 544b596ff..000000000 --- a/ShareX.ScreenCaptureLib/Shapes/Region/TriangleRegionShape.cs +++ /dev/null @@ -1,47 +0,0 @@ -#region License Information (GPL v3) - -/* - ShareX - A program that allows you to take screenshots and share any file type - Copyright (c) 2007-2016 ShareX Team - - 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 . -*/ - -#endregion License Information (GPL v3) - -using ShareX.HelpersLib; -using System; -using System.Collections.Generic; -using System.Drawing; -using System.Drawing.Drawing2D; -using System.Linq; -using System.Text; - -namespace ShareX.ScreenCaptureLib -{ - public class TriangleRegionShape : BaseRegionShape - { - public override ShapeType ShapeType { get; } = ShapeType.RegionTriangle; - - public TriangleAngle Angle { get; set; } - - public override void AddShapePath(GraphicsPath gp, Rectangle rect) - { - gp.AddTriangle(rect, Angle); - } - } -} \ No newline at end of file diff --git a/ShareX.ScreenCaptureLib/ShareX.ScreenCaptureLib.csproj b/ShareX.ScreenCaptureLib/ShareX.ScreenCaptureLib.csproj index 3e4487150..e9a49ff26 100644 --- a/ShareX.ScreenCaptureLib/ShareX.ScreenCaptureLib.csproj +++ b/ShareX.ScreenCaptureLib/ShareX.ScreenCaptureLib.csproj @@ -87,7 +87,6 @@ - @@ -131,7 +130,6 @@ - diff --git a/ShareX.ScreenCaptureLib/SurfaceOptions.cs b/ShareX.ScreenCaptureLib/SurfaceOptions.cs index 88c186959..ad0e77f00 100644 --- a/ShareX.ScreenCaptureLib/SurfaceOptions.cs +++ b/ShareX.ScreenCaptureLib/SurfaceOptions.cs @@ -113,10 +113,7 @@ public SurfaceOptions() new SnapSize(1280, 720), // 720p new SnapSize(1920, 1080), // 1080p new SnapSize(2560, 1440), // 1440p - new SnapSize(3840, 2160), // 2160p - new SnapSize(800, 600), // SVGA - new SnapSize(1024, 768), // XGA - new SnapSize(4096, 2160) // 4K + new SnapSize(3840, 2160) // 2160p }; } }