XAML代码:
<Image x:Name="layer1Image" ImageOpened="layer1Image_Opened"
ManipulationMode="All"
ManipulationDelta="layer1Image_ManipulationDelta">
<Image.RenderTransform>
<CompositeTransform x:Name="layer1ImageTransform"></CompositeTransform>
</Image.RenderTransform>
</Image>
private void layer1Image_ManipulationDelta(object sender, ManipulationDeltaRoutedEventArgs e)
{
var currentImage = e.OriginalSource as Image;
var transform = currentImage.RenderTransform as CompositeTransform;
transform.TranslateX += e.Delta.Translation.X;
transform.TranslateY += e.Delta.Translation.Y;
transform.ScaleX *= e.Delta.Scale;
transform.ScaleY *= e.Delta.Scale;
transform.Rotation += e.Delta.Rotation;
}
我已经执行了缩放,旋转和移动图像,如何在本地计算机中保存操作图像。