Exemplo n.º 1
0
        public override bool CopyToCompositeTransform(CompositeTransformNode compositeTransform)
        {
            if (!this.Platform.Metadata.IsCapabilitySet(PlatformCapability.SupportsCompositeTransform))
            {
                return(false);
            }
            ISceneNodeCollection <SceneNode> children = this.Children;

            if (children == null || children.Count == 0)
            {
                return(false);
            }
            if (children.Count == 1)
            {
                return(((TransformNode)children[0]).CopyToCompositeTransform(compositeTransform));
            }
            if (!this.IsCanonical)
            {
                return(false);
            }
            foreach (TransformNode transformNode in (IEnumerable <SceneNode>)children)
            {
                if (transformNode == null)
                {
                    return(false);
                }
                transformNode.CopyToCompositeTransform(compositeTransform);
            }
            return(true);
        }
Exemplo n.º 2
0
 public override bool CopyToCompositeTransform(CompositeTransformNode compositeTransform)
 {
     if (!this.Platform.Metadata.IsCapabilitySet(PlatformCapability.SupportsCompositeTransform))
     {
         return(false);
     }
     SceneNode.CopyPropertyValue((SceneNode)this, TranslateTransformNode.XProperty, (SceneNode)compositeTransform, CompositeTransformNode.TranslateXProperty);
     SceneNode.CopyPropertyValue((SceneNode)this, TranslateTransformNode.YProperty, (SceneNode)compositeTransform, CompositeTransformNode.TranslateYProperty);
     return(true);
 }