本文整理汇总了C#中Matrix.InitMatrix方法的典型用法代码示例。如果您正苦于以下问题:C# Matrix.InitMatrix方法的具体用法?C# Matrix.InitMatrix怎么用?C# Matrix.InitMatrix使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Matrix
的用法示例。
在下文中一共展示了Matrix.InitMatrix方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Swap
private void Swap ()
{
DocumentSelection swap_selection = PintaCore.Workspace.ActiveDocument.Selection;
PintaCore.Workspace.ActiveDocument.Selection = old_selection;
old_selection = swap_selection;
Matrix swap_transform = new Matrix();
swap_transform.InitMatrix(PintaCore.Layers.SelectionLayer.Transform);
PintaCore.Layers.SelectionLayer.Transform.InitMatrix(old_transform);
old_transform.InitMatrix(swap_transform);
if (lifted) {
// Grab the original surface
ImageSurface surf = PintaCore.Layers[layer_index].Surface;
// Undo to the "old" surface
PintaCore.Layers[layer_index].Surface = old_surface;
// Store the original surface for Redo
old_surface = surf;
is_lifted = !is_lifted;
doc.ShowSelectionLayer = is_lifted;
}
PintaCore.Workspace.Invalidate ();
}
示例2: Redo
public override void Redo ()
{
Matrix swap_transfrom = new Matrix();
swap_transfrom.InitMatrix(PintaCore.Layers.SelectionLayer.Transform);
ImageSurface swap_surf = PintaCore.Layers.CurrentLayer.Surface.Clone ();
ImageSurface swap_sel = PintaCore.Layers.SelectionLayer.Surface;
PintaCore.Layers.CurrentLayer.Surface = old_surface;
PintaCore.Layers.SelectionLayer.Surface = old_selection_layer;
PintaCore.Layers.SelectionLayer.Transform.InitMatrix(old_transform);
old_surface = swap_surf;
old_selection_layer = swap_sel;
old_transform.InitMatrix(swap_transfrom);
PintaCore.Layers.DestroySelectionLayer ();
PintaCore.Workspace.Invalidate ();
}
示例3: Undo
public override void Undo ()
{
PintaCore.Layers.ShowSelectionLayer = true;
Matrix swap_transfrom = new Matrix();
swap_transfrom.InitMatrix(PintaCore.Layers.SelectionLayer.Transform);
ImageSurface swap_surf = PintaCore.Layers.CurrentLayer.Surface;
ImageSurface swap_sel = PintaCore.Layers.SelectionLayer.Surface;
PintaCore.Layers.SelectionLayer.Surface = old_selection_layer;
PintaCore.Layers.SelectionLayer.Transform.InitMatrix(old_transform);
PintaCore.Layers.CurrentLayer.Surface = old_surface;
old_transform.InitMatrix(swap_transfrom);
old_surface = swap_surf;
old_selection_layer = swap_sel;
PintaCore.Workspace.Invalidate ();
PintaCore.Tools.SetCurrentTool (Catalog.GetString ("Move Selected Pixels"));
}