我有一个名为"drawCanvas“的画布,用于显示画布中包含的图像和墨水画布,称为"CanvasContainInkCanvas”。我可以用MatrixTransform放大。
//Get the image that's being manipulation.
Canvas element = (Canvas)e.Source;
//Ues the matrix of the transform to manipulation the element's appearance.
Matrix matrix = ((MatrixTransform)drawCanvas.RenderTransform).Matrix;
//Get the ManipulationDelta object.
ManipulationDelta deltaManipulation = e.DeltaManipulation;
//Find the old center, and apply any previous manipulations.
Point center = new Point(element.ActualWidth / 2, element.ActualHeight / 2);
//Apply new move manipulation (if it exists).
center = matrix.Transform(center);
//Apply new zoom manipulation (if it exists).
matrix.ScaleAt(deltaManipulation.Scale.X, deltaManipulation.Scale.Y, center.X, center.Y);
//Translation (pan)
matrix.Translate(e.DeltaManipulation.Translation.X, e.DeltaManipulation.Translation.Y);
//Set the final matrix.
((MatrixTransform)drawCanvas.RenderTransform).Matrix = matrix;
// set the matrix of canvas that contain inkcanvas
((MatrixTransform)CanvasContainInkCanvas.RenderTransform).Matrix = matrix;如果我放大,我可以看到画布外面的图像。

我想复制图像从画布到墨水画布使用选择。我的问题是这些图像不能在画布外显示。

如何在画布外显示图像?
谢谢
更新:如何在油墨画布外使用选择?
发布于 2011-01-13 08:46:06
将ClipToBounds="False"设置在InkCanvas上。默认情况下,它被设置为True。
https://stackoverflow.com/questions/4678116
复制相似问题