DrawToolsRedux/DrawEllipse.cs

(开头部分) 2KB

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

using System;
using System.Drawing;
using System.Drawing.Drawing2D;

namespace DrawTools
{
	/// <summary>
	/// Ellipse graphic object
	/// </summary>
	[Serializable]
	public class DrawEllipse : DrawRectangle
	{
		public DrawEllipse()
		{
			SetRectangle(0, 0, 1, 1);
			Initialize();
		}

		/// <summary>
		/// Clone this instance
		/// </summary>
		public override DrawObject Clone()
		{
			DrawEllipse drawEllipse = new DrawEllipse();
			drawEllipse.Rectangle = Rectangle;

			FillDrawObjectFields(drawEllipse);
			return drawEllipse;
		}

		public DrawEllipse(int x, int y, int width, int height)
		{
			Rectangle = new Rectangle(x, y, width, height);
			Center = new Point(x + (width / 2), y + (height / 2));
			TipText = String.Format("Ellipse Center @ {0}, {1}", Center.X, Center.Y);
			Initialize();
		}

		public DrawEllipse(int x, int y, int width, int height, Color lineColor, Color fillColor, bool filled)
		{
			Rectangle = new Rectangle(x, y, width, height);
			Center = new Point(x + (width / 2), y + (height / 2));
			TipText = String.Format("Ellipse Center @ {0}, {1}", Center.X, Center.Y);
			Color = lineColor;
			FillColor = fillColor;
			Filled = filled;
			Initialize();
		}

		public DrawEllipse(int x, int y, int width, int height, DrawingPens.PenType pType, Color fillColor, bool filled)
		{
			Rectangle = new Rectangle(x, y, width, height);
			Center = new Point(x + (width / 2), y + (height / 2));
			TipText = String.Format("Ellipse Center @ {0}, {1}", Center.X, Center.Y);
			DrawPen = DrawingPens.SetCurrentPen(pType);
			PenType = pType;
			FillColor = fillColor;
			Filled = filled;
			Initialize();
		}
后面还有 42 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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