AutoPatientInfoRecorder/src/AntdUI/Lib/SVG/Painting/SvgPaintServer.cs
(完整代码) 2KB// 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;
using System.Drawing;
namespace AntdUI.Svg
{
/// <summary>
/// Represents the base class for all paint servers that are intended to be used as a fill or stroke.
/// </summary>
public abstract class SvgPaintServer : SvgElement
{
public Func<SvgPaintServer> GetCallback { get; set; }
/// <summary>
/// An unspecified <see cref="SvgPaintServer"/>.
/// </summary>
public static readonly SvgPaintServer None = new SvgColourServer();
/// <summary>
/// Initializes a new instance of the <see cref="SvgPaintServer"/> class.
/// </summary>
public SvgPaintServer()
{
}
/// <summary>
/// Renders the <see cref="SvgElement"/> and contents to the specified <see cref="ISvgRenderer"/> object.
/// </summary>
/// <param name="renderer">The <see cref="ISvgRenderer"/> object to render to.</param>
protected override void Render(ISvgRenderer renderer)
{
// Never render paint servers or their children
}
/// <summary>
/// Gets a <see cref="Brush"/> representing the current paint server.
/// </summary>
/// <param name="styleOwner">The owner <see cref="SvgVisualElement"/>.</param>
/// <param name="renderer">The renderer object.</param>
/// <param name="opacity">The opacity of the brush.</param>
/// <param name="forStroke">Not used.</param>
public abstract Brush GetBrush(SvgVisualElement styleOwner, ISvgRenderer renderer, float opacity, bool forStroke = false);
/// <summary>
/// Returns a <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.
/// </summary>
/// <returns>
/// A <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.
/// </returns>
public override string ToString()
{
return string.Format("url(#{0})", ID);
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。