本文整理汇总了C#中System.Windows.Media.GeneralTransform.GetCurrentValueAsFrozen方法的典型用法代码示例。如果您正苦于以下问题:C# GeneralTransform.GetCurrentValueAsFrozen方法的具体用法?C# GeneralTransform.GetCurrentValueAsFrozen怎么用?C# GeneralTransform.GetCurrentValueAsFrozen使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Media.GeneralTransform
的用法示例。
在下文中一共展示了GeneralTransform.GetCurrentValueAsFrozen方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GeneralTransform2DTo3D
internal GeneralTransform2DTo3D(GeneralTransform transform2D,
Viewport2DVisual3D containingVisual3D,
GeneralTransform3D transform3D)
{
Visual child = containingVisual3D.Visual;
Debug.Assert(child != null, "Going from 2D to 3D containingVisual3D.Visual should not be null");
_transform3D = (GeneralTransform3D)transform3D.GetCurrentValueAsFrozen();
// we also need to go one more level up to handle a transform being placed
// on the Viewport2DVisual3D's child
GeneralTransformGroup transformGroup = new GeneralTransformGroup();
transformGroup.Children.Add((GeneralTransform)transform2D.GetCurrentValueAsFrozen());
transformGroup.Children.Add((GeneralTransform)child.TransformToOuterSpace().GetCurrentValueAsFrozen());
transformGroup.Freeze();
_transform2D = transformGroup;
_positions = containingVisual3D.InternalPositionsCache;
_textureCoords = containingVisual3D.InternalTextureCoordinatesCache;
_triIndices = containingVisual3D.InternalTriangleIndicesCache;
_childBounds = child.CalculateSubgraphRenderBoundsOuterSpace();
}