Пример #1
0
		/// <summary>
		/// Resets the height of the ellipse path contained in the specified GraphicsPath object.
		/// </summary>
		/// <param name="ellipsePath">The GraphicsPath object that will be set.</param>
		/// <param name="height">The new height.</param>
		public static void SetHeight(System.Drawing.Drawing2D.GraphicsPath ellipsePath, float height)
		{
			System.Drawing.RectangleF rectangle = ellipsePath.GetBounds();
			rectangle.Height = height;
			ellipsePath.Reset();
			ellipsePath.AddEllipse(rectangle);
		}
Пример #2
0
		/// <summary>
		/// Resets the width of the ellipse path contained in the specified GraphicsPath object.
		/// </summary>
		/// <param name="ellipsePath">The GraphicsPath object that will be set.</param>
		/// <param name="width">The new width.</param>
		public static void SetWidth(System.Drawing.Drawing2D.GraphicsPath ellipsePath, float width)
		{
			System.Drawing.RectangleF rectangle = ellipsePath.GetBounds();
			rectangle.Width = width;
			ellipsePath.Reset();
			ellipsePath.AddEllipse(rectangle);
		}
Пример #3
0
 public static void ElipseToPath(System.Drawing.Drawing2D.GraphicsPath gp, FloatPoint xp, double rad_max, double velo)
 {
     FloatPoint pnew = Centered(xp,rad_max,velo);
       FloatPoint hp = GetPressureRadius(rad_max,velo);
       gp.AddEllipse(xp.X-hp.X,xp.Y-hp.Y,hp.X,hp.Y);
 }
Пример #4
0
		/// <summary>
		/// Resets the y-coordinate of the ellipse path contained in the specified GraphicsPath object.
		/// </summary>
		/// <param name="ellipsePath">The GraphicsPath object that will be set.</param>
		/// <param name="y">The new y-coordinate.</param>
		public static void SetY(System.Drawing.Drawing2D.GraphicsPath ellipsePath, float y)
		{
			System.Drawing.RectangleF rectangle = ellipsePath.GetBounds();
			rectangle.Y = y;
			ellipsePath.Reset();
			ellipsePath.AddEllipse(rectangle);
		}
Пример #5
0
 public static void ElipseToPath(System.Drawing.Drawing2D.GraphicsPath gp, FloatPoint xp, double radius)
 {
     FloatPoint rp = new FloatPoint(radius), hp = rp * 0.5f, dp = rp * 2.0f;
       FloatPoint p = xp-rp;
       gp.AddEllipse(p.X,p.Y,dp.X,dp.Y);
 }