Add enhanced selection tools

This commit is contained in:
XY Wang 2021-12-12 00:32:33 +08:00
parent 8ca8abba24
commit a8dd8286d0
12 changed files with 2046 additions and 74 deletions

View File

@ -11,6 +11,7 @@
<ui:XamlControlsResources />
<ResourceDictionary Source="Resources/SeewoImageDictionary.xaml"/>
<ResourceDictionary Source="Resources/DrawShapeImageDictionary.xaml"/>
<ResourceDictionary Source="Resources/IconImageDictionary.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>

View File

@ -181,6 +181,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Resources\IconImageDictionary.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Resources\DrawShapeImageDictionary.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>

View File

@ -54,18 +54,100 @@
</DrawingAttributes>
</InkCanvas.DefaultDrawingAttributes>-->
</InkCanvas>
<Grid Name="GridInkCanvasSelectionCover"
MouseDown="GridInkCanvasSelectionCover_MouseDown"
MouseUp="GridInkCanvasSelectionCover_MouseUp"
IsManipulationEnabled="True"
ManipulationStarting="GridInkCanvasSelectionCover_ManipulationStarting"
ManipulationCompleted="GridInkCanvasSelectionCover_ManipulationCompleted"
ManipulationDelta="GridInkCanvasSelectionCover_ManipulationDelta"
PreviewTouchDown="GridInkCanvasSelectionCover_PreviewTouchDown"
PreviewTouchUp="GridInkCanvasSelectionCover_PreviewTouchUp"
TouchDown="GridInkCanvasSelectionCover_TouchDown"
TouchUp="GridInkCanvasSelectionCover_TouchUp"
Background="#01FFFFFF" Opacity="0.01" Visibility="Collapsed"/>
<Grid Visibility="{Binding ElementName=inkCanvas, Path=Visibility}">
<Grid Name="GridInkCanvasSelectionCover"
MouseDown="GridInkCanvasSelectionCover_MouseDown"
MouseUp="GridInkCanvasSelectionCover_MouseUp"
IsManipulationEnabled="True"
ManipulationStarting="GridInkCanvasSelectionCover_ManipulationStarting"
ManipulationCompleted="GridInkCanvasSelectionCover_ManipulationCompleted"
ManipulationDelta="GridInkCanvasSelectionCover_ManipulationDelta"
PreviewTouchDown="GridInkCanvasSelectionCover_PreviewTouchDown"
PreviewTouchUp="GridInkCanvasSelectionCover_PreviewTouchUp"
TouchDown="GridInkCanvasSelectionCover_TouchDown"
TouchUp="GridInkCanvasSelectionCover_TouchUp"
Background="#01FFFFFF" Opacity="0.01" Visibility="Visible"/>
<Border Name="BorderStrokeSelectionControl"
HorizontalAlignment="Left" VerticalAlignment="Top" Margin="100,900,0,0"
CornerRadius="5" Height="80"
Background="#9FFFFFFF" Visibility="{Binding ElementName=GridInkCanvasSelectionCover, Path=Visibility}"
BorderThickness="1" BorderBrush="#BF666666">
<Viewbox Margin="0,-2.5">
<ui:SimpleStackPanel Orientation="Horizontal" Spacing="10" Height="60">
<Border Name="BorderStrokeSelectionClone" Margin="0,2,-9,2" Background="Transparent" CornerRadius="{Binding ElementName=BorderStrokeSelectionControl, Path=CornerRadius}"
Width="40" MouseDown="Border_MouseDown" MouseUp="BorderStrokeSelectionClone_MouseUp">
<ui:SimpleStackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Spacing="5">
<ui:SymbolIcon Symbol="Copy" Foreground="#666666"/>
<TextBlock Text="克隆" FontSize="10" Foreground="#666666"/>
</ui:SimpleStackPanel>
</Border>
<Border Width="1" Height="45" BorderBrush="#666666" Background="#666666"/>
<Border CornerRadius="{Binding ElementName=BorderStrokeSelectionControl, Path=CornerRadius}" Height="40">
<ui:SimpleStackPanel VerticalAlignment="Center" Spacing="5" Margin="0,-10">
<ui:SimpleStackPanel Orientation="Horizontal" Spacing="15">
<Image Source="{DynamicResource Rotate45DrawingImage}" Height="22" MouseDown="Border_MouseDown" MouseUp="ImageRotate45_MouseUp"/>
<Image Source="{DynamicResource Rotate90DrawingImage}" Height="22" MouseDown="Border_MouseDown" MouseUp="ImageRotate90_MouseUp"/>
</ui:SimpleStackPanel>
<TextBlock Text="旋转" FontSize="10" HorizontalAlignment="Center" Foreground="#666666"/>
</ui:SimpleStackPanel>
</Border>
<Border Width="1" Height="45" BorderBrush="#666666" Background="#666666"/>
<Border Margin="0,0,-6,0" CornerRadius="{Binding ElementName=BorderStrokeSelectionControl, Path=CornerRadius}" Height="40">
<ui:SimpleStackPanel VerticalAlignment="Center" Spacing="5" Margin="0,-10">
<ui:SimpleStackPanel Orientation="Horizontal" Spacing="15">
<Image Source="{DynamicResource FlipDrawingImage}" Width="19" Height="22" MouseDown="Border_MouseDown" MouseUp="ImageFlipHorizontal_MouseUp"/>
<Image Source="{DynamicResource FlipDrawingImage}" Width="19" Height="22" MouseDown="Border_MouseDown" MouseUp="ImageFlipVertical_MouseUp"
Margin="0,0,8,0" RenderTransformOrigin="0.5,0.5">
<Image.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="90"/>
<TranslateTransform/>
</TransformGroup>
</Image.RenderTransform>
</Image>
</ui:SimpleStackPanel>
<TextBlock Text="翻转" FontSize="10" Margin="-8,0,0,0" HorizontalAlignment="Center" Foreground="#666666"/>
</ui:SimpleStackPanel>
</Border>
<Border Width="1" Height="45" BorderBrush="#666666" Background="#666666"/>
<Border CornerRadius="{Binding ElementName=BorderStrokeSelectionControl, Path=CornerRadius}" Height="40">
<ui:SimpleStackPanel VerticalAlignment="Center" Spacing="5" Margin="0,-10">
<ui:SimpleStackPanel Orientation="Horizontal" Spacing="13">
<Grid MouseDown="Border_MouseDown" MouseUp="GridPenWidthDecrease_MouseUp">
<ui:SymbolIcon Symbol="Edit" Foreground="#666666"/>
<TextBlock Text="-" Foreground="#666666"
VerticalAlignment="Bottom" HorizontalAlignment="Right"
Margin="0,0,-2,-7" FontSize="15"/>
</Grid>
<Grid MouseDown="Border_MouseDown" MouseUp="GridPenWidthIncrease_MouseUp">
<ui:SymbolIcon Symbol="Edit" Foreground="#666666"/>
<TextBlock Text="+" Foreground="#666666"
VerticalAlignment="Bottom" HorizontalAlignment="Right"
Margin="0,0,-3,-4" FontSize="11"/>
</Grid>
<Grid MouseDown="Border_MouseDown" MouseUp="GridPenWidthRestore_MouseUp">
<ui:SymbolIcon Symbol="Edit" Foreground="#666666"/>
<Image Source="{DynamicResource AndroidRefreshDrawingImage}" VerticalAlignment="Bottom" HorizontalAlignment="Right"
Margin="0,0,-2,-2" Width="8">
</Image>
</Grid>
</ui:SimpleStackPanel>
<TextBlock Text="画笔粗细" FontSize="10" HorizontalAlignment="Center" Foreground="#666666"/>
</ui:SimpleStackPanel>
</Border>
<Border Width="1" Height="45" BorderBrush="#666666" Background="#666666"/>
<Border Margin="-8,0,0,0" CornerRadius="{Binding ElementName=BorderStrokeSelectionControl, Path=CornerRadius}" Width="40" MouseDown="Border_MouseDown" MouseUp="BorderStrokeSelectionDelete_MouseUp">
<ui:SimpleStackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Spacing="5">
<ui:SymbolIcon Symbol="Delete" Foreground="#666666"/>
<TextBlock Text="删除" FontSize="10" Foreground="#666666"/>
</ui:SimpleStackPanel>
</Border>
</ui:SimpleStackPanel>
</Viewbox>
</Border>
</Grid>
<Grid Visibility="Collapsed">
<Grid Visibility="{Binding ElementName=GridBackgroundCoverHolder, Path=Visibility}">
@ -266,8 +348,10 @@
<GroupBox Header="手势">
<ui:SimpleStackPanel Spacing="12">
<ui:ToggleSwitch Name="ToggleSwitchEnableTwoFingerRotation" Header="允许双指旋转" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchEnableTwoFingerRotation_Toggled"/>
<TextBlock Text="允许选中墨迹后对墨迹进行双指或多指缩放操作(此设置不受“允许双指旋转”设置的影响)" TextWrapping="Wrap" Foreground="#666666"/>
<ui:ToggleSwitch Name="ToggleSwitchEnableTwoFingerRotationOnSelection" Header="允许双指旋转选中的墨迹" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchEnableTwoFingerRotation_Toggled"/>
<ui:ToggleSwitch Name="ToggleSwitchEnableTwoFingerGestureInPresentationMode" Header="允许幻灯片模式下的双指手势" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchEnableTwoFingerGestureInPresentationMode_Toggled"/>
<TextBlock Text="允许开启画板时使用手指手势进行幻灯片翻页(启用后,在幻灯片放映模式下,当画板无墨迹时,使用手指(笔尖或手掌无法识别)左右滑动即可控制幻灯片翻页。)" TextWrapping="Wrap" Foreground="#666666"/>
<TextBlock Text="允许开启画板时使用手指手势进行幻灯片翻页(启用后,在幻灯片放映模式下,当画板无墨迹时,使用手指(笔尖或手掌无法识别)左右滑动即可控制幻灯片翻页。" TextWrapping="Wrap" Foreground="#666666"/>
<ui:ToggleSwitch Name="ToggleSwitchEnableFingerGestureSlideShowControl" Header="允许使用手指手势进行幻灯片翻页" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" IsOn="True" Toggled="ToggleSwitchEnableFingerGestureSlideShowControl_Toggled"/>
</ui:SimpleStackPanel>
</GroupBox>
@ -767,7 +851,7 @@
</Image>
</Grid>
<Grid Margin="0,0,0,0" Width="20">
<ui:SymbolIcon Symbol="Delete" Foreground="#666666" MouseUp="SymbolIconDelete_MouseUp"/>
<ui:SymbolIcon Symbol="Delete" Foreground="#666666" MouseDown="Border_MouseDown" MouseUp="SymbolIconDelete_MouseUp"/>
<Border x:Name="BorderClearInDelete" Visibility="Collapsed" Background="White" BorderBrush="#BF666666" BorderThickness="1"
CornerRadius="5" Margin="-40,-60,-40,35">
<Button Content="点击清屏" ui:ThemeManager.RequestedTheme="Light"
@ -850,6 +934,12 @@
<Image Margin="8,12.5,0,10" MouseUp="BtnDrawCone_Click" Source="{DynamicResource DrawShapeImageSource.Cone}"/>
<Image Margin="5.5,12.5,2.5,10" MouseUp="BtnDrawCuboid_Click" Source="{DynamicResource DrawShapeImageSource.Cuboid}"/>
<Image Visibility="Collapsed" Margin="0,11.5,2.5,9.5" MouseUp="BtnDrawCuboid_Click" Source="{DynamicResource DrawShapeImageSource.Tetrahedron}"/>
<Viewbox Height="40" Margin="-4,-4,0,0">
<ui:SimpleStackPanel>
<Image Height="55" Visibility="{Binding ElementName=GroupBoxMASEZVersion, Path=Visibility}" Source="Resources/logo2.png"/>
<TextBlock Margin="0,-15,0,0" Visibility="{Binding ElementName=GroupBoxMASEZVersion, Path=Visibility}" Text="二中专版" FontSize="11" FontWeight="Bold" HorizontalAlignment="Center" Foreground="#666666"/>
</ui:SimpleStackPanel>
</Viewbox>
</ui:SimpleStackPanel>
</ui:SimpleStackPanel>
</Viewbox>

View File

@ -52,6 +52,7 @@ namespace Ink_Canvas
BorderSettings.Visibility = Visibility.Collapsed;
StackPanelToolButtons.Visibility = Visibility.Collapsed;
BorderDrawShape.Visibility = Visibility.Collapsed;
GridInkCanvasSelectionCover.Visibility = Visibility.Collapsed;
if (App.StartArgs.Contains("-b")) //-b border
{
@ -160,7 +161,7 @@ namespace Ink_Canvas
catch { }
}
ApplicationGesture lastApplicationGesture = ApplicationGesture.AllGestures;
//ApplicationGesture lastApplicationGesture = ApplicationGesture.AllGestures;
DateTime lastGestureTime = DateTime.Now;
private void InkCanvas_Gesture(object sender, InkCanvasGestureEventArgs e)
{
@ -296,7 +297,10 @@ namespace Ink_Canvas
}
}
}
}
if (response.Contains("Special Version") || response.Contains("AutoUpdateOnly"))
{
Application.Current.Dispatcher.Invoke(() =>
{
Version version = Assembly.GetExecutingAssembly().GetName().Version;
@ -513,6 +517,14 @@ namespace Ink_Canvas
{
ToggleSwitchEnableTwoFingerRotation.IsOn = false;
}
if (Settings.Gesture.IsEnableTwoFingerRotationOnSelection)
{
ToggleSwitchEnableTwoFingerRotationOnSelection.IsOn = true;
}
else
{
ToggleSwitchEnableTwoFingerRotationOnSelection.IsOn = false;
}
if (Settings.Gesture.IsEnableTwoFingerGestureInPresentationMode)
{
ToggleSwitchEnableTwoFingerGestureInPresentationMode.IsOn = true;
@ -712,6 +724,7 @@ namespace Ink_Canvas
{
BorderDrawShape.Visibility = Visibility.Collapsed;
}
GridInkCanvasSelectionCover.Visibility = Visibility.Collapsed;
Label.Content = "isSingleFingerDragMode=" + isSingleFingerDragMode.ToString();
if (isSingleFingerDragMode)
{
@ -2330,6 +2343,7 @@ namespace Ink_Canvas
if (!isLoaded) return;
Settings.Gesture.IsEnableTwoFingerRotation = ToggleSwitchEnableTwoFingerRotation.IsOn;
Settings.Gesture.IsEnableTwoFingerRotationOnSelection = ToggleSwitchEnableTwoFingerRotationOnSelection.IsOn;
SaveSettingsToFile();
}
@ -2545,13 +2559,16 @@ namespace Ink_Canvas
}
#endregion Other Controls
#endregion Left Side Panel
#region Selection Gestures
bool isGridInkCanvasSelectionCoverMouseDown = false;
StrokeCollection StrokesSelectionClone = new StrokeCollection();
private void GridInkCanvasSelectionCover_MouseDown(object sender, MouseButtonEventArgs e)
{
isGridInkCanvasSelectionCoverMouseDown = true;
//GridInkCanvasSelectionCover.Visibility = Visibility.Collapsed;
}
private void GridInkCanvasSelectionCover_MouseUp(object sender, MouseButtonEventArgs e)
@ -2571,6 +2588,9 @@ namespace Ink_Canvas
inkCanvas.IsManipulationEnabled = false;
}
double BorderStrokeSelectionControlWidth = 490.0;
double BorderStrokeSelectionControlHeight = 80.0;
private void inkCanvas_SelectionChanged(object sender, EventArgs e)
{
if (inkCanvas.GetSelectedStrokes().Count == 0)
@ -2580,12 +2600,23 @@ namespace Ink_Canvas
else
{
GridInkCanvasSelectionCover.Visibility = Visibility.Visible;
//GridInkCanvasSelectionCover.Height = inkCanvas.GetSelectionBounds().Height;
//GridInkCanvasSelectionCover.Width = inkCanvas.GetSelectionBounds().Width;
//GridInkCanvasSelectionCover.Margin = new Thickness(inkCanvas.GetSelectionBounds().Left, inkCanvas.GetSelectionBounds().Top, 0, 0);
BorderStrokeSelectionClone.Background = Brushes.Transparent;
isStrokeSelectionCloneOn = false;
updateBorderStrokeSelectionControlLocation();
}
}
private void updateBorderStrokeSelectionControlLocation()
{
double borderLeft = (inkCanvas.GetSelectionBounds().Left + inkCanvas.GetSelectionBounds().Right - BorderStrokeSelectionControlWidth) / 2;
double borderTop = inkCanvas.GetSelectionBounds().Bottom + 15;
if (borderLeft < 0) borderLeft = 0;
if (borderTop < 0) borderTop = 0;
if (Width - borderLeft < BorderStrokeSelectionControlWidth) borderLeft = Width - BorderStrokeSelectionControlWidth;
if (Height - borderTop < BorderStrokeSelectionControlHeight) borderTop = Height - BorderStrokeSelectionControlHeight;
BorderStrokeSelectionControl.Margin = new Thickness(borderLeft, borderTop, 0, 0);
}
private void GridInkCanvasSelectionCover_ManipulationStarting(object sender, ManipulationStartingEventArgs e)
{
e.Mode = ManipulationModes.All;
@ -2598,43 +2629,53 @@ namespace Ink_Canvas
private void GridInkCanvasSelectionCover_ManipulationDelta(object sender, ManipulationDeltaEventArgs e)
{
if (dec.Count >= 1)
try
{
ManipulationDelta md = e.DeltaManipulation;
Vector trans = md.Translation; // 获得位移矢量
double rotate = md.Rotation; // 获得旋转角度
Vector scale = md.Scale; // 获得缩放倍数
Matrix m = new Matrix();
// Find center of element and then transform to get current location of center
FrameworkElement fe = e.Source as FrameworkElement;
Point center = new Point(fe.ActualWidth / 2, fe.ActualHeight / 2);
center = new Point(inkCanvas.GetSelectionBounds().Left + inkCanvas.GetSelectionBounds().Width / 2,
inkCanvas.GetSelectionBounds().Top + inkCanvas.GetSelectionBounds().Height / 2);
center = m.Transform(center); // 转换为矩阵缩放和旋转的中心点
// Update matrix to reflect translation/rotation
m.Translate(trans.X, trans.Y); // 移动
if (Settings.Gesture.IsEnableTwoFingerRotation)
if (dec.Count >= 1)
{
m.RotateAt(rotate, center.X, center.Y); // 旋转
}
m.ScaleAt(scale.X, scale.Y, center.X, center.Y); // 缩放
ManipulationDelta md = e.DeltaManipulation;
Vector trans = md.Translation; // 获得位移矢量
double rotate = md.Rotation; // 获得旋转角度
Vector scale = md.Scale; // 获得缩放倍数
StrokeCollection strokes = inkCanvas.GetSelectedStrokes();
foreach (Stroke stroke in strokes)
{
stroke.Transform(m, false);
Matrix m = new Matrix();
try
// Find center of element and then transform to get current location of center
FrameworkElement fe = e.Source as FrameworkElement;
Point center = new Point(fe.ActualWidth / 2, fe.ActualHeight / 2);
center = new Point(inkCanvas.GetSelectionBounds().Left + inkCanvas.GetSelectionBounds().Width / 2,
inkCanvas.GetSelectionBounds().Top + inkCanvas.GetSelectionBounds().Height / 2);
center = m.Transform(center); // 转换为矩阵缩放和旋转的中心点
// Update matrix to reflect translation/rotation
m.Translate(trans.X, trans.Y); // 移动
m.ScaleAt(scale.X, scale.Y, center.X, center.Y); // 缩放
StrokeCollection strokes = inkCanvas.GetSelectedStrokes();
if (StrokesSelectionClone.Count != 0)
{
stroke.DrawingAttributes.Width *= md.Scale.X;
stroke.DrawingAttributes.Height *= md.Scale.Y;
strokes = StrokesSelectionClone;
}
catch { }
else if (Settings.Gesture.IsEnableTwoFingerRotationOnSelection)
{
m.RotateAt(rotate, center.X, center.Y); // 旋转
}
foreach (Stroke stroke in strokes)
{
stroke.Transform(m, false);
try
{
stroke.DrawingAttributes.Width *= md.Scale.X;
stroke.DrawingAttributes.Height *= md.Scale.Y;
}
catch { }
}
updateBorderStrokeSelectionControlLocation();
}
}
catch { }
}
private void GridInkCanvasSelectionCover_TouchDown(object sender, TouchEventArgs e)
@ -2655,20 +2696,19 @@ namespace Ink_Canvas
TouchPoint touchPoint = e.GetTouchPoint(null);
centerPoint = touchPoint.Position;
lastTouchPointOnGridInkCanvasCover = touchPoint.Position;
if (isStrokeSelectionCloneOn)
{
StrokesSelectionClone = inkCanvas.GetSelectedStrokes().Clone();
inkCanvas.Strokes.Add(StrokesSelectionClone);
}
}
////设备两个及两个以上,将画笔功能关闭
//if (dec.Count > 1)
//{
// if (inkCanvas.EditingMode != InkCanvasEditingMode.None && inkCanvas.EditingMode != InkCanvasEditingMode.Select)
// {
// lastInkCanvasEditingMode = inkCanvas.EditingMode;
// inkCanvas.EditingMode = InkCanvasEditingMode.None;
// }
//}
}
private void GridInkCanvasSelectionCover_PreviewTouchUp(object sender, TouchEventArgs e)
{
dec.Remove(e.TouchDevice.Id);
if (dec.Count >= 1) return;
if (lastTouchPointOnGridInkCanvasCover == e.GetTouchPoint(null).Position)
{
if (lastTouchPointOnGridInkCanvasCover.X < inkCanvas.GetSelectionBounds().Left ||
@ -2677,34 +2717,23 @@ namespace Ink_Canvas
lastTouchPointOnGridInkCanvasCover.Y > inkCanvas.GetSelectionBounds().Bottom)
{
inkCanvas.Select(new StrokeCollection());
StrokesSelectionClone = new StrokeCollection();
}
}
else if (inkCanvas.GetSelectedStrokes().Count == 0)
{
GridInkCanvasSelectionCover.Visibility = Visibility.Collapsed;
StrokesSelectionClone = new StrokeCollection();
}
else
{
GridInkCanvasSelectionCover.Visibility = Visibility.Visible;
//GridInkCanvasSelectionCover.Height = inkCanvas.GetSelectionBounds().Height;
//GridInkCanvasSelectionCover.Width = inkCanvas.GetSelectionBounds().Width;
//GridInkCanvasSelectionCover.Margin = new Thickness(inkCanvas.GetSelectionBounds().Left, inkCanvas.GetSelectionBounds().Top, 0, 0);
StrokesSelectionClone = new StrokeCollection();
}
////手势完成后切回之前的状态
//if (dec.Count > 1)
//{
// if (inkCanvas.EditingMode == InkCanvasEditingMode.None)
// {
// inkCanvas.EditingMode = lastInkCanvasEditingMode;
// }
//}
dec.Remove(e.TouchDevice.Id);
}
#endregion Selection Gestures
#endregion Left Side Panel
#region Shape Drawing
#region Floating Bar Control
@ -3282,9 +3311,9 @@ namespace Ink_Canvas
inkCanvas.Strokes.Add(stroke);
break;
case 23:
a = Math.Abs(endP.X - iniP.X) / 2;
b = Math.Abs(endP.Y - iniP.Y) / 2;
pointList = GenerateEllipseGeometry(new Point(iniP.X - a * 2, iniP.Y - b * 2), new Point(iniP.X + a * 2, iniP.Y + b * 2));
a = Math.Abs(endP.X - iniP.X);
b = Math.Abs(endP.Y - iniP.Y);
pointList = GenerateEllipseGeometry(new Point(iniP.X - a, iniP.Y - b), new Point(iniP.X + a, iniP.Y + b));
point = new StylusPointCollection(pointList);
stroke = new Stroke(point)
{
@ -5017,9 +5046,11 @@ namespace Ink_Canvas
private void SymbolIconDelete_MouseUp(object sender, MouseButtonEventArgs e)
{
if (sender != lastBorderMouseDownObject) return;
if (inkCanvas.GetSelectedStrokes().Count > 0)
{
inkCanvas.Strokes.Remove(inkCanvas.GetSelectedStrokes());
GridInkCanvasSelectionCover.Visibility = Visibility.Collapsed;
}
else if (inkCanvas.Strokes.Count > 0)
{
@ -5263,6 +5294,167 @@ namespace Ink_Canvas
BtnPPTSlidesDown_Click(BtnPPTSlidesDown, null);
}
object lastBorderMouseDownObject;
private void Border_MouseDown(object sender, MouseButtonEventArgs e)
{
lastBorderMouseDownObject = sender;
}
bool isStrokeSelectionCloneOn = false;
private void BorderStrokeSelectionClone_MouseUp(object sender, MouseButtonEventArgs e)
{
if (lastBorderMouseDownObject != sender) return;
if (isStrokeSelectionCloneOn)
{
BorderStrokeSelectionClone.Background = Brushes.Transparent;
isStrokeSelectionCloneOn = false;
}
else
{
BorderStrokeSelectionClone.Background = new SolidColorBrush(StringToColor("#FF1ED760"));
isStrokeSelectionCloneOn = true;
}
}
private void BorderStrokeSelectionDelete_MouseUp(object sender, MouseButtonEventArgs e)
{
if (lastBorderMouseDownObject == sender)
{
SymbolIconDelete_MouseUp(sender, e);
}
}
private void GridPenWidthDecrease_MouseUp(object sender, MouseButtonEventArgs e)
{
if (lastBorderMouseDownObject != sender) return;
foreach (Stroke stroke in inkCanvas.GetSelectedStrokes())
{
stroke.DrawingAttributes.Width *= 0.8;
stroke.DrawingAttributes.Height *= 0.8;
}
}
private void GridPenWidthIncrease_MouseUp(object sender, MouseButtonEventArgs e)
{
if (lastBorderMouseDownObject != sender) return;
foreach (Stroke stroke in inkCanvas.GetSelectedStrokes())
{
stroke.DrawingAttributes.Width *= 1.25;
stroke.DrawingAttributes.Height *= 1.25;
}
}
private void GridPenWidthRestore_MouseUp(object sender, MouseButtonEventArgs e)
{
if (lastBorderMouseDownObject != sender) return;
foreach (Stroke stroke in inkCanvas.GetSelectedStrokes())
{
stroke.DrawingAttributes.Width = inkCanvas.DefaultDrawingAttributes.Width;
stroke.DrawingAttributes.Height = inkCanvas.DefaultDrawingAttributes.Height;
}
}
private void ImageFlipHorizontal_MouseUp(object sender, MouseButtonEventArgs e)
{
if (lastBorderMouseDownObject != sender) return;
Matrix m = new Matrix();
// Find center of element and then transform to get current location of center
FrameworkElement fe = e.Source as FrameworkElement;
Point center = new Point(fe.ActualWidth / 2, fe.ActualHeight / 2);
center = new Point(inkCanvas.GetSelectionBounds().Left + inkCanvas.GetSelectionBounds().Width / 2,
inkCanvas.GetSelectionBounds().Top + inkCanvas.GetSelectionBounds().Height / 2);
center = m.Transform(center); // 转换为矩阵缩放和旋转的中心点
// Update matrix to reflect translation/rotation
m.ScaleAt(-1, 1, center.X, center.Y); // 缩放
StrokeCollection strokes = inkCanvas.GetSelectedStrokes();
foreach (Stroke stroke in strokes)
{
stroke.Transform(m, false);
}
//updateBorderStrokeSelectionControlLocation();
}
private void ImageFlipVertical_MouseUp(object sender, MouseButtonEventArgs e)
{
if (lastBorderMouseDownObject != sender) return;
Matrix m = new Matrix();
// Find center of element and then transform to get current location of center
FrameworkElement fe = e.Source as FrameworkElement;
Point center = new Point(fe.ActualWidth / 2, fe.ActualHeight / 2);
center = new Point(inkCanvas.GetSelectionBounds().Left + inkCanvas.GetSelectionBounds().Width / 2,
inkCanvas.GetSelectionBounds().Top + inkCanvas.GetSelectionBounds().Height / 2);
center = m.Transform(center); // 转换为矩阵缩放和旋转的中心点
// Update matrix to reflect translation/rotation
m.ScaleAt(1, -1, center.X, center.Y); // 缩放
StrokeCollection strokes = inkCanvas.GetSelectedStrokes();
foreach (Stroke stroke in strokes)
{
stroke.Transform(m, false);
}
}
private void ImageRotate45_MouseUp(object sender, MouseButtonEventArgs e)
{
if (lastBorderMouseDownObject != sender) return;
Matrix m = new Matrix();
// Find center of element and then transform to get current location of center
FrameworkElement fe = e.Source as FrameworkElement;
Point center = new Point(fe.ActualWidth / 2, fe.ActualHeight / 2);
center = new Point(inkCanvas.GetSelectionBounds().Left + inkCanvas.GetSelectionBounds().Width / 2,
inkCanvas.GetSelectionBounds().Top + inkCanvas.GetSelectionBounds().Height / 2);
center = m.Transform(center); // 转换为矩阵缩放和旋转的中心点
// Update matrix to reflect translation/rotation
m.RotateAt(45, center.X, center.Y); // 旋转
StrokeCollection strokes = inkCanvas.GetSelectedStrokes();
foreach (Stroke stroke in strokes)
{
stroke.Transform(m, false);
}
}
private void ImageRotate90_MouseUp(object sender, MouseButtonEventArgs e)
{
if (lastBorderMouseDownObject != sender) return;
Matrix m = new Matrix();
// Find center of element and then transform to get current location of center
FrameworkElement fe = e.Source as FrameworkElement;
Point center = new Point(fe.ActualWidth / 2, fe.ActualHeight / 2);
center = new Point(inkCanvas.GetSelectionBounds().Left + inkCanvas.GetSelectionBounds().Width / 2,
inkCanvas.GetSelectionBounds().Top + inkCanvas.GetSelectionBounds().Height / 2);
center = m.Transform(center); // 转换为矩阵缩放和旋转的中心点
// Update matrix to reflect translation/rotation
m.RotateAt(90, center.X, center.Y); // 旋转
StrokeCollection strokes = inkCanvas.GetSelectedStrokes();
foreach (Stroke stroke in strokes)
{
stroke.Transform(m, false);
}
}
private void ImagePPTControlEnd_MouseUp(object sender, MouseButtonEventArgs e)
{
BtnPPTSlideShowEnd_Click(BtnPPTSlideShowEnd, null);

View File

@ -0,0 +1,113 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<DrawingImage x:Key="Rotate45DrawingImage">
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V36 H36 V0 H0 Z">
<DrawingGroup Transform="1,0,0,1,-14,-14">
<GeometryDrawing Brush="#666666" Geometry="F1 M36,36z M0,0z M50,32A17.78,17.78,0,0,1,49.35,36.78A18.35,18.35,0,0,1,47.5,41.15A18.12,18.12,0,0,1,44.57,44.88A17.56,17.56,0,0,1,40.68,47.75L45.5,47.75 45.5,50 36.5,50 36.5,41 38.75,41 38.75,46.22A15,15,0,0,0,42.47,43.76A16.18,16.18,0,0,0,45.31,40.41A15.89,15.89,0,0,0,47.12,36.41A15.78,15.78,0,0,0,47.19,27.83A15.36,15.36,0,0,0,45.6,24.06A16.21,16.21,0,0,0,43.13,20.87A15.93,15.93,0,0,0,39.94,18.4A16.28,16.28,0,0,0,36.18,16.81A15.84,15.84,0,0,0,27.83,16.81A15.79,15.79,0,0,0,16.83,27.81A15.6,15.6,0,0,0,16.25,32A15.26,15.26,0,0,0,17.1,37.08A16,16,0,0,0,19.49,41.53A16.23,16.23,0,0,0,23.13,45A15.23,15.23,0,0,0,27.8,47.17L27.2,49.33A17,17,0,0,1,21.86,46.86A18.36,18.36,0,0,1,17.68,42.86A18.11,18.11,0,0,1,15,37.81A18,18,0,0,1,14.67,27.22A18.28,18.28,0,0,1,16.48,22.91A18.07,18.07,0,0,1,22.94,16.45A18.38,18.38,0,0,1,27.24,14.64A18.21,18.21,0,0,1,36.81,14.64A18.28,18.28,0,0,1,41.12,16.45A18.07,18.07,0,0,1,47.58,22.91A18.28,18.28,0,0,1,49.39,27.22A17.67,17.67,0,0,1,50,32z" />
</DrawingGroup>
<DrawingGroup Transform="1,0,0,1,-14,-14">
<GeometryDrawing Brush="#666666" Geometry="F1 M36,36z M0,0z M28.6,26.4L28.6,33.63 30.27,33.63 30.27,35.14 28.6,35.14 28.6,37.6 26.84,37.6 26.84,35.14 21.77,35.14 21.77,33.62Q22.46,32.84,23.18,31.94C23.67,31.34 24.13,30.72 24.57,30.1 25.01,29.48 25.43,28.84 25.81,28.21A16.94,16.94,0,0,0,26.81,26.4z M26.84,33.63L26.84,28.93A25.47,25.47,0,0,1,25.16,31.6C24.61,32.36,24.09,33.04,23.6,33.6z" />
</DrawingGroup>
<DrawingGroup Transform="1,0,0,1,-14,-14">
<GeometryDrawing Brush="#666666" Geometry="F1 M36,36z M0,0z M31.8,37.34L31.8,35.6A4,4,0,0,0,34.03,36.34A2.78,2.78,0,0,0,35.87,35.76A1.92,1.92,0,0,0,36.56,34.21A1.73,1.73,0,0,0,35.86,32.73A3.31,3.31,0,0,0,33.86,32.19C33.56,32.19,32.94,32.19,32.02,32.29L32.42,26.4 37.94,26.4 37.94,27.94 33.94,27.94 33.75,30.75 34.75,30.75A3.85,3.85,0,0,1,37.5,31.66A3.25,3.25,0,0,1,38.5,34.16A3.43,3.43,0,0,1,37.3,36.8A4.39,4.39,0,0,1,34.24,37.8A5,5,0,0,1,31.8,37.34z" />
</DrawingGroup>
<DrawingGroup Transform="1,0,0,1,-14,-14">
<GeometryDrawing Brush="#666666" Geometry="F1 M36,36z M0,0z M42.53,30.6A2.08,2.08,0,0,1,41,30A2.12,2.12,0,0,1,40.36,28.44A2.05,2.05,0,0,1,41,26.87A2.09,2.09,0,0,1,42.54,26.24A2.15,2.15,0,0,1,44.1,26.87A2.06,2.06,0,0,1,44.75,28.4A2.16,2.16,0,0,1,44.08,30A2.1,2.1,0,0,1,42.53,30.6z M42.53,27.28A1.09,1.09,0,0,0,41.73,27.61A1.07,1.07,0,0,0,41.4,28.4A1.17,1.17,0,0,0,41.72,29.22A1.05,1.05,0,0,0,42.52,29.56A1.1,1.1,0,0,0,43.32,29.22A1.15,1.15,0,0,0,43.66,28.4A1.07,1.07,0,0,0,43.32,27.6A1.1,1.1,0,0,0,42.53,27.28z" />
</DrawingGroup>
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
<DrawingImage x:Key="Rotate90DrawingImage">
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V36 H36 V0 H0 Z">
<DrawingGroup Transform="1,0,0,1,-14,-14">
<GeometryDrawing Brush="#666666" Geometry="F1 M36,36z M0,0z M50,32A17.78,17.78,0,0,1,49.35,36.78A18.35,18.35,0,0,1,47.5,41.15A18.12,18.12,0,0,1,44.57,44.88A17.56,17.56,0,0,1,40.68,47.75L45.5,47.75 45.5,50 36.5,50 36.5,41 38.75,41 38.75,46.22A15,15,0,0,0,42.47,43.76A16.18,16.18,0,0,0,45.31,40.41A15.89,15.89,0,0,0,47.12,36.41A15.78,15.78,0,0,0,47.19,27.83A15.36,15.36,0,0,0,45.6,24.06A16.21,16.21,0,0,0,43.13,20.87A15.93,15.93,0,0,0,39.94,18.4A16.28,16.28,0,0,0,36.18,16.81A15.84,15.84,0,0,0,27.83,16.81A15.79,15.79,0,0,0,16.83,27.81A15.6,15.6,0,0,0,16.25,32A15.26,15.26,0,0,0,17.1,37.08A16,16,0,0,0,19.49,41.53A16.23,16.23,0,0,0,23.13,45A15.23,15.23,0,0,0,27.8,47.17L27.2,49.33A17,17,0,0,1,21.86,46.86A18.36,18.36,0,0,1,17.68,42.86A18.11,18.11,0,0,1,15,37.81A18,18,0,0,1,14.67,27.22A18.28,18.28,0,0,1,16.48,22.91A18.07,18.07,0,0,1,22.94,16.45A18.38,18.38,0,0,1,27.24,14.64A18.21,18.21,0,0,1,36.81,14.64A18.28,18.28,0,0,1,41.12,16.45A18.07,18.07,0,0,1,47.58,22.91A18.28,18.28,0,0,1,49.39,27.22A17.67,17.67,0,0,1,50,32z" />
</DrawingGroup>
<DrawingGroup Transform="1,0,0,1,-14,-14">
<GeometryDrawing Brush="#666666" Geometry="F1 M36,36z M0,0z M29.55,31.39A9.85,9.85,0,0,1,29.18,34.28A5.55,5.55,0,0,1,28.18,36.28A3.83,3.83,0,0,1,26.69,37.43A4.52,4.52,0,0,1,24.85,37.8C24.64,37.8,24.42,37.8,24.21,37.8A5.7,5.7,0,0,1,23.59,37.69A5.15,5.15,0,0,1,23.06,37.56L22.66,37.41 22.66,35.74A3.09,3.09,0,0,0,23.07,35.95A3.66,3.66,0,0,0,23.6,36.13A5.63,5.63,0,0,0,24.19,36.27A4.28,4.28,0,0,0,24.79,36.27A2.86,2.86,0,0,0,26,36.06A2.42,2.42,0,0,0,26.92,35.29A3.51,3.51,0,0,0,27.51,34A6.48,6.48,0,0,0,27.72,32.26L27.72,32.26A2.63,2.63,0,0,1,27.35,32.73A2.59,2.59,0,0,1,26.82,33.12A3.26,3.26,0,0,1,26.16,33.39A2.78,2.78,0,0,1,25.38,33.49A3.55,3.55,0,0,1,24,33.28A3.27,3.27,0,0,1,22.95,32.58A3.45,3.45,0,0,1,22.25,31.48A4,4,0,0,1,22,30A4.19,4.19,0,0,1,22.29,28.42A3.6,3.6,0,0,1,23.09,27.21A3.42,3.42,0,0,1,24.28,26.45A4.07,4.07,0,0,1,25.77,26.18A3.66,3.66,0,0,1,27.21,26.46A3.21,3.21,0,0,1,28.39,27.37A4.59,4.59,0,0,1,29.25,29A8.21,8.21,0,0,1,29.55,31.39z M27.66,30.19A3.31,3.31,0,0,0,27.51,29.19A2.35,2.35,0,0,0,27.11,28.4A1.85,1.85,0,0,0,26.5,27.89A1.72,1.72,0,0,0,25.72,27.71A1.64,1.64,0,0,0,25,27.87A1.76,1.76,0,0,0,24.41,28.3A2.07,2.07,0,0,0,24,29A2.5,2.5,0,0,0,23.85,29.88A3,3,0,0,0,23.99,30.82A1.85,1.85,0,0,0,24.4,31.5A1.69,1.69,0,0,0,25.02,31.93A2.28,2.28,0,0,0,25.82,32.07A1.89,1.89,0,0,0,26.54,31.93A1.94,1.94,0,0,0,27.12,31.53A1.85,1.85,0,0,0,27.51,30.95A1.89,1.89,0,0,0,27.66,30.19z" />
</DrawingGroup>
<DrawingGroup Transform="1,0,0,1,-14,-14">
<GeometryDrawing Brush="#666666" Geometry="F1 M36,36z M0,0z M34.62,37.79A3.13,3.13,0,0,1,31.89,36.36A7.24,7.24,0,0,1,30.89,32.23A8.14,8.14,0,0,1,31.89,27.73A3.35,3.35,0,0,1,34.89,26.21Q38.59,26.21,38.59,31.95A7.6,7.6,0,0,1,37.59,36.29A3.36,3.36,0,0,1,34.62,37.79z M34.8,27.65Q32.8,27.65,32.8,32.15C32.8,34.95 33.46,36.35 34.8,36.35 36.14,36.35 36.8,34.93 36.8,32.08 36.8,29.23 36.08,27.65 34.8,27.65z" />
</DrawingGroup>
<DrawingGroup Transform="1,0,0,1,-14,-14">
<GeometryDrawing Brush="#666666" Geometry="F1 M36,36z M0,0z M42.24,30.6A2.08,2.08,0,0,1,40.69,30A2.12,2.12,0,0,1,40.05,28.44A2.05,2.05,0,0,1,40.68,26.91A2.09,2.09,0,0,1,42.22,26.28A2.17,2.17,0,0,1,43.79,26.91A2.09,2.09,0,0,1,44.43,28.44A2.12,2.12,0,0,1,43.79,30A2.1,2.1,0,0,1,42.24,30.6z M42.24,27.28A1.09,1.09,0,0,0,41.44,27.61A1.07,1.07,0,0,0,41.11,28.4A1.17,1.17,0,0,0,41.43,29.22A1.05,1.05,0,0,0,42.23,29.56A1.1,1.1,0,0,0,43.03,29.22A1.15,1.15,0,0,0,43.37,28.4A1.09,1.09,0,0,0,43.04,27.6A1.14,1.14,0,0,0,42.24,27.28z" />
</DrawingGroup>
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
<DrawingImage x:Key="FlipDrawingImage">
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V890 H650 V0 H0 Z">
<GeometryDrawing>
<GeometryDrawing.Pen>
<Pen Brush="#666666" Thickness="54" StartLineCap="Round" EndLineCap="Round" LineJoin="Round" />
</GeometryDrawing.Pen>
<GeometryDrawing.Geometry>
<RectangleGeometry RadiusX="0" RadiusY="0" Rect="25,324,600,450" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing>
<GeometryDrawing.Pen>
<Pen Brush="#666666" Thickness="54" StartLineCap="Round" EndLineCap="Round" LineJoin="Round" />
</GeometryDrawing.Pen>
<GeometryDrawing.Geometry>
<LineGeometry StartPoint="325,25" EndPoint="325,100" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing>
<GeometryDrawing.Pen>
<Pen Brush="#666666" Thickness="54" StartLineCap="Round" EndLineCap="Round" DashCap="Round" LineJoin="Round">
<Pen.DashStyle>
<DashStyle Offset="0" Dashes="2.76 2.76" />
</Pen.DashStyle>
</Pen>
</GeometryDrawing.Pen>
<GeometryDrawing.Geometry>
<LineGeometry StartPoint="325,238" EndPoint="325,721" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing>
<GeometryDrawing.Pen>
<Pen Brush="#666666" Thickness="54" StartLineCap="Round" EndLineCap="Round" LineJoin="Round" />
</GeometryDrawing.Pen>
<GeometryDrawing.Geometry>
<LineGeometry StartPoint="325,790" EndPoint="325,865" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<DrawingGroup Transform="1,0,0,1,-175,-55">
<GeometryDrawing Geometry="F1 M650,890z M0,0z M290,167.77C324,193.07 374.32,222.77 438.14,235.65 469.39,241.96 527.44,252.86 598.97,227.21 652.37,208.06 692.04,176.16 716.5,152.88">
<GeometryDrawing.Pen>
<Pen Brush="#666666" Thickness="54" StartLineCap="Round" EndLineCap="Round" LineJoin="Round" />
</GeometryDrawing.Pen>
</GeometryDrawing>
</DrawingGroup>
<GeometryDrawing>
<GeometryDrawing.Pen>
<Pen Brush="#666666" Thickness="54" StartLineCap="Round" EndLineCap="Round" LineJoin="Round" />
</GeometryDrawing.Pen>
<GeometryDrawing.Geometry>
<LineGeometry StartPoint="422,98" EndPoint="542,95.02" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing>
<GeometryDrawing.Pen>
<Pen Brush="#666666" Thickness="54" StartLineCap="Round" EndLineCap="Round" LineJoin="Round" />
</GeometryDrawing.Pen>
<GeometryDrawing.Geometry>
<LineGeometry StartPoint="545,100.58" EndPoint="496,206" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
<DrawingImage x:Key="AndroidRefreshDrawingImage">
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V512 H512 V0 H0 Z">
<DrawingGroup Opacity="1">
<GeometryDrawing Brush="#666666" Geometry="F1 M512,512z M0,0z M256,388C183.403,388 124,328.595 124,256 124,183.399 183.403,124 256,124 292.3,124 325.299,139.4 348.406,163.601L278,234 432,234 432,80 380.302,131.702C348.406,99.798 304.406,80 256,80 159.203,80 80,159.203 80,256 80,352.797 158.094,432 256,432 337.045,432 404.287,377.866 425.401,304L378.85,304C360.105,353.561,311.712,388,256,388z" />
</DrawingGroup>
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
</ResourceDictionary>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 650 890"><defs><style>.cls-1,.cls-2{fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:50px;}.cls-2{stroke-dasharray:138 138;}</style></defs><title>Flip</title><rect class="cls-1" x="25" y="324" width="600" height="450"/><line class="cls-1" x1="325" y1="25" x2="325" y2="100"/><line class="cls-2" x1="325" y1="238" x2="325" y2="721"/><line class="cls-1" x1="325" y1="790" x2="325" y2="865"/><path class="cls-1" d="M290,167.77c34,25.3,84.32,55,148.14,67.88,31.25,6.31,89.3,17.21,160.83-8.44,53.4-19.15,93.07-51.05,117.53-74.33" transform="translate(-175 -55)"/><line class="cls-1" x1="422" y1="98" x2="542" y2="95.02"/><line class="cls-1" x1="545" y1="100.58" x2="496" y2="206"/></svg>

After

Width:  |  Height:  |  Size: 797 B

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 24.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="icon" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 64 64" style="enable-background:new 0 0 64 64;" xml:space="preserve">
<style type="text/css">
.st0{fill:#231F20;}
.st1{fill:none;}
.st2{font-family:'SegoeUI-Semibold';}
.st3{font-size:16px;}
</style>
<path class="st0" d="M50,32c0,1.6-0.2,3.2-0.7,4.8s-1.1,3-1.9,4.4s-1.8,2.6-2.9,3.7s-2.4,2.1-3.9,2.9h4.8V50h-9v-9h2.3v5.2
c1.4-0.6,2.6-1.5,3.7-2.5s2.1-2.1,2.8-3.3s1.4-2.6,1.8-4s0.6-2.9,0.6-4.4c0-1.4-0.2-2.8-0.6-4.2s-0.9-2.6-1.6-3.8s-1.5-2.2-2.5-3.2
s-2-1.8-3.2-2.5s-2.4-1.2-3.8-1.6s-2.7-0.6-4.2-0.6s-2.8,0.2-4.2,0.6s-2.6,0.9-3.8,1.6s-2.2,1.5-3.2,2.5s-1.8,2-2.5,3.2
s-1.2,2.4-1.6,3.8s-0.6,2.7-0.6,4.2c0,1.8,0.3,3.5,0.9,5.1s1.4,3.1,2.4,4.4s2.2,2.5,3.6,3.5s3,1.7,4.7,2.2l-0.6,2.2
c-1.9-0.5-3.7-1.4-5.3-2.5s-3-2.4-4.2-4s-2.1-3.2-2.7-5.1S14,34,14,32c0-1.7,0.2-3.2,0.6-4.8s1-3,1.8-4.3s1.7-2.6,2.8-3.6
s2.3-2,3.6-2.8s2.8-1.4,4.3-1.8S30.3,14,32,14c1.7,0,3.2,0.2,4.8,0.6s3,1,4.3,1.8s2.6,1.7,3.6,2.8s2,2.3,2.8,3.6s1.4,2.8,1.8,4.3
S50,30.3,50,32z"/>
<rect x="21.4" y="25.8" class="st1" width="24.6" height="12.5"/>
<text transform="matrix(1 0 0 1 21.3672 37.6001)" class="st2 st3">45°</text>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1 @@
<svg id="icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36"><defs><style>.cls-1{fill:#231f20;}</style></defs><title>Rotate45</title><path class="cls-1" d="M50,32a17.78,17.78,0,0,1-.65,4.78,18.35,18.35,0,0,1-1.85,4.37,18.12,18.12,0,0,1-2.93,3.73,17.56,17.56,0,0,1-3.89,2.87H45.5V50h-9V41h2.25v5.22a15,15,0,0,0,3.72-2.46,16.18,16.18,0,0,0,2.84-3.35,15.89,15.89,0,0,0,1.81-4,15.78,15.78,0,0,0,.07-8.58,15.36,15.36,0,0,0-1.59-3.77,16.21,16.21,0,0,0-2.47-3.19,15.93,15.93,0,0,0-3.19-2.47,16.28,16.28,0,0,0-3.76-1.59,15.84,15.84,0,0,0-8.35,0,15.79,15.79,0,0,0-11,11A15.6,15.6,0,0,0,16.25,32a15.26,15.26,0,0,0,.85,5.08,16,16,0,0,0,2.39,4.45A16.23,16.23,0,0,0,23.13,45a15.23,15.23,0,0,0,4.67,2.17l-.6,2.16a17,17,0,0,1-5.34-2.47,18.36,18.36,0,0,1-4.18-4A18.11,18.11,0,0,1,15,37.81a18,18,0,0,1-.33-10.59,18.28,18.28,0,0,1,1.81-4.31,18.07,18.07,0,0,1,6.46-6.46,18.38,18.38,0,0,1,4.3-1.81,18.21,18.21,0,0,1,9.57,0,18.28,18.28,0,0,1,4.31,1.81,18.07,18.07,0,0,1,6.46,6.46,18.28,18.28,0,0,1,1.81,4.31A17.67,17.67,0,0,1,50,32Z" transform="translate(-14 -14)"/><path d="M28.6,26.4v7.23h1.67v1.51H28.6V37.6H26.84V35.14H21.77V33.62q.69-.78,1.41-1.68c.49-.6.95-1.22,1.39-1.84s.86-1.26,1.24-1.89a16.94,16.94,0,0,0,1-1.81Zm-1.76,7.23v-4.7a25.47,25.47,0,0,1-1.68,2.67c-.55.76-1.07,1.44-1.56,2Z" transform="translate(-14 -14)"/><path d="M31.8,37.34V35.6a4,4,0,0,0,2.23.74,2.78,2.78,0,0,0,1.84-.58,1.92,1.92,0,0,0,.69-1.55,1.73,1.73,0,0,0-.7-1.48,3.31,3.31,0,0,0-2-.54c-.3,0-.92,0-1.84.1l.4-5.89h5.52v1.54h-4l-.19,2.81,1,0a3.85,3.85,0,0,1,2.75.91,3.25,3.25,0,0,1,1,2.5A3.43,3.43,0,0,1,37.3,36.8a4.39,4.39,0,0,1-3.06,1A5,5,0,0,1,31.8,37.34Z" transform="translate(-14 -14)"/><path d="M42.53,30.6A2.08,2.08,0,0,1,41,30a2.12,2.12,0,0,1-.64-1.56A2.05,2.05,0,0,1,41,26.87a2.09,2.09,0,0,1,1.54-.63,2.15,2.15,0,0,1,1.56.63,2.06,2.06,0,0,1,.65,1.53A2.16,2.16,0,0,1,44.08,30,2.1,2.1,0,0,1,42.53,30.6Zm0-3.32a1.09,1.09,0,0,0-.8.33,1.07,1.07,0,0,0-.33.79,1.17,1.17,0,0,0,.32.82,1.05,1.05,0,0,0,.8.34,1.1,1.1,0,0,0,.8-.34,1.15,1.15,0,0,0,.34-.82,1.07,1.07,0,0,0-.34-.8A1.1,1.1,0,0,0,42.53,27.28Z" transform="translate(-14 -14)"/></svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -0,0 +1 @@
<svg id="icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36"><defs><style>.cls-1{fill:#231f20;}</style></defs><title>Rotate90</title><path class="cls-1" d="M50,32a17.78,17.78,0,0,1-.65,4.78,18.35,18.35,0,0,1-1.85,4.37,18.12,18.12,0,0,1-2.93,3.73,17.56,17.56,0,0,1-3.89,2.87H45.5V50h-9V41h2.25v5.22a15,15,0,0,0,3.72-2.46,16.18,16.18,0,0,0,2.84-3.35,15.89,15.89,0,0,0,1.81-4,15.78,15.78,0,0,0,.07-8.58,15.36,15.36,0,0,0-1.59-3.77,16.21,16.21,0,0,0-2.47-3.19,15.93,15.93,0,0,0-3.19-2.47,16.28,16.28,0,0,0-3.76-1.59,15.84,15.84,0,0,0-8.35,0,15.79,15.79,0,0,0-11,11A15.6,15.6,0,0,0,16.25,32a15.26,15.26,0,0,0,.85,5.08,16,16,0,0,0,2.39,4.45A16.23,16.23,0,0,0,23.13,45a15.23,15.23,0,0,0,4.67,2.17l-.6,2.16a17,17,0,0,1-5.34-2.47,18.36,18.36,0,0,1-4.18-4A18.11,18.11,0,0,1,15,37.81a18,18,0,0,1-.33-10.59,18.28,18.28,0,0,1,1.81-4.31,18.07,18.07,0,0,1,6.46-6.46,18.38,18.38,0,0,1,4.3-1.81,18.21,18.21,0,0,1,9.57,0,18.28,18.28,0,0,1,4.31,1.81,18.07,18.07,0,0,1,6.46,6.46,18.28,18.28,0,0,1,1.81,4.31A17.67,17.67,0,0,1,50,32Z" transform="translate(-14 -14)"/><path d="M29.55,31.39a9.85,9.85,0,0,1-.37,2.89,5.55,5.55,0,0,1-1,2,3.83,3.83,0,0,1-1.49,1.15,4.52,4.52,0,0,1-1.84.37c-.21,0-.43,0-.64,0a5.7,5.7,0,0,1-.62-.11,5.15,5.15,0,0,1-.53-.13l-.4-.15V35.74a3.09,3.09,0,0,0,.41.21,3.66,3.66,0,0,0,.53.18,5.63,5.63,0,0,0,.59.14,4.28,4.28,0,0,0,.6,0A2.86,2.86,0,0,0,26,36.06a2.42,2.42,0,0,0,.92-.77A3.51,3.51,0,0,0,27.51,34a6.48,6.48,0,0,0,.21-1.74h0a2.63,2.63,0,0,1-.37.47,2.59,2.59,0,0,1-.53.39,3.26,3.26,0,0,1-.66.27,2.78,2.78,0,0,1-.78.1A3.55,3.55,0,0,1,24,33.28a3.27,3.27,0,0,1-1.05-.7,3.45,3.45,0,0,1-.7-1.1A4,4,0,0,1,22,30a4.19,4.19,0,0,1,.29-1.58,3.6,3.6,0,0,1,.8-1.21,3.42,3.42,0,0,1,1.19-.76,4.07,4.07,0,0,1,1.49-.27,3.66,3.66,0,0,1,1.44.28,3.21,3.21,0,0,1,1.18.91A4.59,4.59,0,0,1,29.25,29,8.21,8.21,0,0,1,29.55,31.39Zm-1.89-1.2a3.31,3.31,0,0,0-.15-1,2.35,2.35,0,0,0-.4-.79,1.85,1.85,0,0,0-.61-.51,1.72,1.72,0,0,0-.78-.18,1.64,1.64,0,0,0-.72.16,1.76,1.76,0,0,0-.59.43A2.07,2.07,0,0,0,24,29a2.5,2.5,0,0,0-.15.88,3,3,0,0,0,.14.94,1.85,1.85,0,0,0,.41.68,1.69,1.69,0,0,0,.62.43,2.28,2.28,0,0,0,.8.14,1.89,1.89,0,0,0,.72-.14,1.94,1.94,0,0,0,.58-.4,1.85,1.85,0,0,0,.39-.58A1.89,1.89,0,0,0,27.66,30.19Z" transform="translate(-14 -14)"/><path d="M34.62,37.79a3.13,3.13,0,0,1-2.73-1.43,7.24,7.24,0,0,1-1-4.13,8.14,8.14,0,0,1,1-4.5,3.35,3.35,0,0,1,3-1.52q3.7,0,3.7,5.74a7.6,7.6,0,0,1-1,4.34A3.36,3.36,0,0,1,34.62,37.79Zm.18-10.14q-2,0-2,4.5c0,2.8.66,4.2,2,4.2s2-1.42,2-4.27S36.08,27.65,34.8,27.65Z" transform="translate(-14 -14)"/><path d="M42.24,30.6A2.08,2.08,0,0,1,40.69,30a2.12,2.12,0,0,1-.64-1.56,2.05,2.05,0,0,1,.63-1.53,2.09,2.09,0,0,1,1.54-.63,2.17,2.17,0,0,1,1.57.63,2.09,2.09,0,0,1,.64,1.53A2.12,2.12,0,0,1,43.79,30,2.1,2.1,0,0,1,42.24,30.6Zm0-3.32a1.09,1.09,0,0,0-.8.33,1.07,1.07,0,0,0-.33.79,1.17,1.17,0,0,0,.32.82,1.05,1.05,0,0,0,.8.34,1.1,1.1,0,0,0,.8-.34,1.15,1.15,0,0,0,.34-.82,1.09,1.09,0,0,0-.33-.8A1.14,1.14,0,0,0,42.24,27.28Z" transform="translate(-14 -14)"/></svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -49,6 +49,8 @@ namespace Ink_Canvas
{
[JsonProperty("isEnableTwoFingerRotation")]
public bool IsEnableTwoFingerRotation { get; set; } = false;
[JsonProperty("isEnableTwoFingerRotationOnSelection")]
public bool IsEnableTwoFingerRotationOnSelection { get; set; } = false;
[JsonProperty("isEnableTwoFingerGestureInPresentationMode")]
public bool IsEnableTwoFingerGestureInPresentationMode { get; set; } = false;
[JsonProperty("isEnableFingerGestureSlideShowControl")]