AutoPatientInfoRecorder/src/AntdUI/Lib/SVG/Basic Shapes/SvgMarkerElement.cs

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

// THIS FILE IS PART OF SVG PROJECT
// THE SVG PROJECT IS AN OPENSOURCE LIBRARY LICENSED UNDER THE MS-PL License.
// COPYRIGHT (C) svg-net. ALL RIGHTS RESERVED.
// GITHUB: https://github.com/svg-net/SVG

using AntdUI.Svg.ExtensionMethods;
using System;

namespace AntdUI.Svg
{
    /// <summary>
    /// Represents a path based element that can have markers.
    /// </summary>
    public abstract class SvgMarkerElement : SvgPathBasedElement
    {
        /// <summary>
        /// Gets or sets the marker (end cap) of the path.
        /// </summary>
        [SvgAttribute("marker-end", true)]
        public Uri MarkerEnd
        {
            get { return Attributes.GetAttribute<Uri>("marker-end").ReplaceWithNullIfNone(); }
            set { Attributes["marker-end"] = value; }
        }


        /// <summary>
        /// Gets or sets the marker (mid points) of the path.
        /// </summary>
        [SvgAttribute("marker-mid", true)]
        public Uri MarkerMid
        {
            get { return Attributes.GetAttribute<Uri>("marker-mid").ReplaceWithNullIfNone(); }
            set { Attributes["marker-mid"] = value; }
        }


        /// <summary>
        /// Gets or sets the marker (start cap) of the path.
        /// </summary>
        [SvgAttribute("marker-start", true)]
        public Uri MarkerStart
        {
            get { return Attributes.GetAttribute<Uri>("marker-start").ReplaceWithNullIfNone(); }
            set { Attributes["marker-start"] = value; }
        }

        /// <summary>
        /// Renders the stroke of the element to the specified <see cref="ISvgRenderer"/>.
        /// Includes rendering of all markers defined in attributes.
        /// </summary>
        /// <param name="renderer">The <see cref="ISvgRenderer"/> object to render to.</param>
        protected internal override bool RenderStroke(ISvgRenderer renderer)
        {
            var result = base.RenderStroke(renderer);
            var path = Path(renderer);
            var pathLength = path.PathPoints.Length;

            if (MarkerStart != null)
            {
后面还有 46 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。