Exemplo n.º 1
0
            protected override void AssignDefaultValuesToSceneNode(SceneNode2D node)
            {
                base.AssignDefaultValuesToSceneNode(node);
                var c = node as ShapeNode2D;

                c.StrokeDashArray    = StrokeDashArray == null ? new float[0] : StrokeDashArray.Select(x => (float)x).ToArray();
                c.StrokeDashCap      = StrokeDashCap.ToD2DCapStyle();
                c.StrokeDashOffset   = (float)StrokeDashOffset;
                c.StrokeEndLineCap   = StrokeEndLineCap.ToD2DCapStyle();
                c.StrokeLineJoin     = StrokeLineJoin.ToD2DLineJoin();
                c.StrokeMiterLimit   = (float)StrokeMiterLimit;
                c.StrokeStartLineCap = StrokeStartLineCap.ToD2DCapStyle();
                c.StrokeThickness    = (float)StrokeThickness;
                c.StrokeDashStyle    = DashStyle.ToD2DDashStyle();
            }
Exemplo n.º 2
0
            protected override void AssignDefaultValuesToSceneNode(SceneNode2D node)
            {
                base.AssignDefaultValuesToSceneNode(node);
                var c = node as BorderNode2D;

                c.CornerRadius       = (float)CornerRadius;
                c.Padding            = Padding.ToD2DThickness();
                c.StrokeDashCap      = StrokeDashCap.ToD2DCapStyle();
                c.StrokeDashOffset   = (float)StrokeDashOffset;
                c.StrokeDashStyle    = StrokeDashStyle.ToD2DDashStyle();
                c.StrokeEndLineCap   = StrokeEndLineCap.ToD2DCapStyle();
                c.StrokeLineJoin     = StrokeLineJoin.ToD2DLineJoin();
                c.StrokeMiterLimit   = (float)StrokeMiterLimit;
                c.StrokeStartLineCap = StrokeStartLineCap.ToD2DCapStyle();
                c.BorderThickness    = BorderThickness.ToD2DThickness();
            }
Exemplo n.º 3
0
 public virtual bool AddChildNode(SceneNode2D node)
 {
     if (!itemHashSet.ContainsKey(node.GUID))
     {
         itemHashSet.Add(node.GUID, node);
         ItemsInternal.Add(node);
         node.Parent = this;
         if (IsAttached)
         {
             node.Attach(RenderHost);
         }
         return(true);
     }
     else
     {
         return(false);
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// Tries the get node.
 /// </summary>
 /// <param name="guid">The unique identifier.</param>
 /// <param name="node">The node.</param>
 /// <returns></returns>
 public bool TryGetNode(Guid guid, out SceneNode2D node)
 {
     return(itemHashSet.TryGetValue(guid, out node));
 }
Exemplo n.º 5
0
 public SceneNode2DCreatedEventArgs(SceneNode2D node)
 {
     Node = node;
 }
Exemplo n.º 6
0
 protected virtual void AssignDefaultValuesToSceneNode(SceneNode2D node)
 {
 }