Exemple #1
0
        protected override void ApplyDrawNode(DrawNode node)
        {
            PathDrawNode n = (PathDrawNode)node;

            n.Texture              = Texture;
            n.TextureShader        = textureShader;
            n.RoundedTextureShader = roundedTextureShader;
            n.Width    = PathWidth;
            n.DrawSize = DrawSize;

            n.Shared = pathDrawNodeSharedData;

            n.Segments.Clear();

            if (positions.Count > 1)
            {
                Vector2 offset = new Vector2(minX, minY);
                for (int i = 0; i < positions.Count - 1; ++i)
                {
                    n.Segments.Add(new Line(positions[i] - offset, positions[i + 1] - offset));
                }
            }

            base.ApplyDrawNode(node);
        }
Exemple #2
0
        protected override void ApplyDrawNode(DrawNode node)
        {
            PathDrawNode n = (PathDrawNode)node;

            n.Texture              = Texture;
            n.TextureShader        = textureShader;
            n.RoundedTextureShader = roundedTextureShader;
            n.Width    = PathWidth;
            n.DrawSize = DrawSize;

            n.Shared = pathDrawNodeSharedData;

            n.Segments = segments.ToList();

            base.ApplyDrawNode(node);
        }