当前位置: 首页>>代码示例>>C#>>正文


C# Matrix.InitMatrix方法代码示例

本文整理汇总了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 ();
		}
开发者ID:msiyer,项目名称:Pinta,代码行数:27,代码来源:MovePixelsHistoryItem.cs

示例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 ();
		}
开发者ID:msiyer,项目名称:Pinta,代码行数:18,代码来源:FinishPixelsHistoryItem.cs

示例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"));
		}
开发者ID:msiyer,项目名称:Pinta,代码行数:20,代码来源:FinishPixelsHistoryItem.cs


注:本文中的Matrix.InitMatrix方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。