Show opening/closing 9:16 stills from the same filtergraph, and let users drag a keep-region on a source frame to fill the crop insets.
66 lines
3.0 KiB
XML
66 lines
3.0 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<UserControl
|
|
x:Class="AmiReel.Controls.SourceCropEditor"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
mc:Ignorable="d">
|
|
|
|
<StackPanel Spacing="10" MinWidth="640">
|
|
<TextBlock x:Name="StatusText"
|
|
Text="Drag on the frame to keep that region. The rest is cropped away."
|
|
Style="{StaticResource MutedTextStyle}"
|
|
TextWrapping="WrapWholeWords" />
|
|
<ProgressBar x:Name="LoadProgress"
|
|
IsIndeterminate="True"
|
|
Height="6"
|
|
Visibility="Collapsed"
|
|
AutomationProperties.Name="Loading source frame" />
|
|
<Border Background="{ThemeResource PageBrush}"
|
|
BorderBrush="{ThemeResource BorderBrush}"
|
|
BorderThickness="1"
|
|
CornerRadius="8">
|
|
<Grid x:Name="CropHost"
|
|
Height="420"
|
|
Background="Transparent"
|
|
PointerPressed="CropHost_PointerPressed"
|
|
PointerMoved="CropHost_PointerMoved"
|
|
PointerReleased="CropHost_PointerReleased"
|
|
PointerCaptureLost="CropHost_PointerCaptureLost"
|
|
SizeChanged="CropHost_SizeChanged"
|
|
AutomationProperties.Name="Source crop frame"
|
|
AutomationProperties.AutomationId="SourceCropHost">
|
|
<Image x:Name="SourceImage"
|
|
Stretch="Uniform"
|
|
IsHitTestVisible="False"
|
|
AutomationProperties.Name="Source video frame" />
|
|
<Canvas x:Name="OverlayCanvas" IsHitTestVisible="False">
|
|
<Rectangle x:Name="SelectionRect"
|
|
Stroke="{ThemeResource AccentBrush}"
|
|
StrokeThickness="2"
|
|
Fill="#33007ACC"
|
|
Visibility="Collapsed" />
|
|
</Canvas>
|
|
</Grid>
|
|
</Border>
|
|
<Grid ColumnSpacing="10">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock x:Name="InsetsText"
|
|
Grid.Column="0"
|
|
Text="Crop L0 R0 T0 B0"
|
|
Style="{StaticResource MutedTextStyle}"
|
|
VerticalAlignment="Center" />
|
|
<Button x:Name="ClearCropButton"
|
|
Grid.Column="1"
|
|
Content="Clear crop"
|
|
Click="ClearCrop_Click"
|
|
AutomationProperties.Name="Clear crop"
|
|
AutomationProperties.AutomationId="ClearSourceCropButton" />
|
|
</Grid>
|
|
</StackPanel>
|
|
</UserControl>
|