AutoPatientInfoRecorder/src/AntdUI/Lib/SVG/Basic Shapes/SvgEllipse.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 System.Drawing.Drawing2D;
namespace AntdUI.Svg
{
/// <summary>
/// Represents and SVG ellipse element.
/// </summary>
public class SvgEllipse : SvgPathBasedElement
{
public override string ClassName { get => "ellipse"; }
private GraphicsPath _path;
[SvgAttribute("cx")]
public virtual SvgUnit CenterX
{
get { return Attributes.GetAttribute<SvgUnit>("cx"); }
set { Attributes["cx"] = value; IsPathDirty = true; }
}
[SvgAttribute("cy")]
public virtual SvgUnit CenterY
{
get { return Attributes.GetAttribute<SvgUnit>("cy"); }
set { Attributes["cy"] = value; IsPathDirty = true; }
}
[SvgAttribute("rx")]
public virtual SvgUnit RadiusX
{
get { return Attributes.GetAttribute<SvgUnit>("rx"); }
set { Attributes["rx"] = value; IsPathDirty = true; }
}
[SvgAttribute("ry")]
public virtual SvgUnit RadiusY
{
get { return Attributes.GetAttribute<SvgUnit>("ry"); }
set { Attributes["ry"] = value; IsPathDirty = true; }
}
/// <summary>
/// Gets the <see cref="GraphicsPath"/> for this element.
/// </summary>
/// <value></value>
public override GraphicsPath Path(ISvgRenderer renderer)
{
if (_path == null || IsPathDirty)
{
var halfStrokeWidth = base.StrokeWidth / 2;
// If it is to render, don't need to consider stroke width.
// i.e stroke width only to be considered when calculating boundary
if (renderer != null)
{
后面还有 29 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。