コード例 #1
0
ファイル: NuGenAbs.cs プロジェクト: radtek/GenXSource
 /// <summary>
 /// Measures the element and its subitems with the specified <see cref="NuGenRenderElementArgs"/>
 /// on the specified location.
 /// </summary>
 /// <param name="e"></param>
 /// <param name="location"></param>
 public override void RenderElement(NuGenRenderElementArgs e, Point location)
 {
     this.Element.RenderElement(e, new Point(location.X + 2, location.Y + 3));
     //draw abs lines
     e.Graphics.DrawLine(e.Pen,
                         location.X + 1, location.Y + 3,
                         location.X + 1, location.Y + this.RenderBounds.Height - 3);
     e.Graphics.DrawLine(e.Pen,
                         location.X + this.RenderBounds.Width, location.Y + 3,
                         location.X + this.RenderBounds.Width, location.Y + this.RenderBounds.Height - 3);
 }
コード例 #2
0
ファイル: NuGenAbs.cs プロジェクト: xuchuansheng/GenXSource
		/// <summary>
		/// Measures the element and its subitems with the specified <see cref="NuGenRenderElementArgs"/>
		/// on the specified location.
		/// </summary>
		/// <param name="e"></param>
		/// <param name="location"></param>
		public override void RenderElement(NuGenRenderElementArgs e, Point location)
		{
			this.Element.RenderElement(e, new Point(location.X + 2, location.Y + 3));
			//draw abs lines
			e.Graphics.DrawLine(e.Pen,
				location.X + 1, location.Y + 3,
				location.X + 1, location.Y + this.RenderBounds.Height - 3);
			e.Graphics.DrawLine(e.Pen,
				location.X + this.RenderBounds.Width, location.Y + 3,
				location.X + this.RenderBounds.Width, location.Y + this.RenderBounds.Height - 3);
		}
コード例 #3
0
 /// <summary>
 /// Measures the element and its subitems with the specified <see cref="NuGenRenderElementArgs"/>
 /// on the specified location.
 /// </summary>
 /// <param name="e"></param>
 /// <param name="location"></param>
 public override void RenderElement(NuGenRenderElementArgs e, Point location)
 {
     //render first subelement
     this.Left.RenderElement(e, new Point(
                                 location.X,
                                 location.Y + this.RenderBounds.TopPart - this.Left.RenderBounds.TopPart));
     //render operator
     e.Graphics.FillEllipse(e.Brush,
                            location.X + this.RenderBounds.LeftPart - 1,
                            location.Y + this.RenderBounds.TopPart - 1, 2, 2);
     //render second subelement
     this.Right.RenderElement(e, new Point(
                                  location.X + this.RenderBounds.Width - this.Right.RenderBounds.Width,
                                  location.Y + this.RenderBounds.TopPart - this.Right.RenderBounds.TopPart));
 }
コード例 #4
0
		/// <summary>
		/// Measures the element and its subitems with the specified <see cref="NuGenRenderElementArgs"/>
		/// on the specified location.
		/// </summary>
		/// <param name="e"></param>
		/// <param name="location"></param>
		public override void RenderElement(NuGenRenderElementArgs e, Point location)
		{
			//render first subelement
			this.Left.RenderElement(e, new Point(
				location.X,
				location.Y + this.RenderBounds.TopPart - this.Left.RenderBounds.TopPart));
			//render operator
			e.Graphics.FillEllipse(e.Brush,
				location.X + this.RenderBounds.LeftPart - 1,
				location.Y + this.RenderBounds.TopPart - 1, 2, 2);
			//render second subelement
			this.Right.RenderElement(e, new Point(
				location.X + this.RenderBounds.Width - this.Right.RenderBounds.Width,
				location.Y + this.RenderBounds.TopPart - this.Right.RenderBounds.TopPart));
		}
コード例 #5
0
		/// <summary>
		/// Measures the element and its subitems with the specified <see cref="NuGenRenderElementArgs"/>
		/// on the specified location.
		/// </summary>
		/// <param name="e"></param>
		/// <param name="location"></param>
		public override void RenderElement(NuGenRenderElementArgs e, Point location)
		{
			//render first subelement
			this.Left.RenderElement(e, new Point(
				location.X + this.RenderBounds.LeftPart - this.Left.RenderBounds.Width / 2,
				location.Y + this.RenderBounds.TopPart - this.Left.RenderBounds.Height + 1));
			//render operator
			e.Graphics.DrawLine(e.Pen,
				location.X + 1, location.Y + this.RenderBounds.TopPart,
				location.X + this.RenderBounds.Width - 1, location.Y + this.RenderBounds.TopPart);
			//render second subelement
			this.Right.RenderElement(e, new Point(
				location.X + this.RenderBounds.LeftPart - this.Right.RenderBounds.Width / 2,
				location.Y + this.RenderBounds.TopPart));
		}
コード例 #6
0
 /// <summary>
 /// Measures the element and its subitems with the specified <see cref="NuGenRenderElementArgs"/>
 /// on the specified location.
 /// </summary>
 /// <param name="e"></param>
 /// <param name="location"></param>
 public override void RenderElement(NuGenRenderElementArgs e, Point location)
 {
     //render first subelement
     this.Left.RenderElement(e, new Point(
                                 location.X,
                                 location.Y + this.RenderBounds.TopPart - this.Left.RenderBounds.TopPart));
     //render operator
     e.Graphics.DrawLine(e.Pen,
                         location.X + this.RenderBounds.LeftPart - 3, location.Y + this.RenderBounds.TopPart,
                         location.X + this.RenderBounds.LeftPart + 3, location.Y + this.RenderBounds.TopPart);
     //render second subelement
     this.Right.RenderElement(e, new Point(
                                  location.X + this.RenderBounds.Width - this.Right.RenderBounds.Width,
                                  location.Y + this.RenderBounds.TopPart - this.Right.RenderBounds.TopPart));
 }
コード例 #7
0
		/// <summary>
		/// Measures the element and its subitems with the specified <see cref="NuGenRenderElementArgs"/>
		/// on the specified location.
		/// </summary>
		/// <param name="e"></param>
		/// <param name="location"></param>
		public override void RenderElement(NuGenRenderElementArgs e, Point location)
		{
			//render first subelement
			this.Left.RenderElement(e, new Point(
				location.X,
				location.Y + this.RenderBounds.TopPart - this.Left.RenderBounds.TopPart));
			//render operator
			int height = (int)e.Graphics.MeasureString("mod", e.Font).Height;
			e.Graphics.DrawString("mod", e.Font, e.Brush,
				location.X + this.RenderBounds.LeftPart,
				location.Y + this.RenderBounds.TopPart - height / 2);
			//render second subelement
			this.Right.RenderElement(e, new Point(
				location.X + this.RenderBounds.Width - this.Right.RenderBounds.Width,
				location.Y + this.RenderBounds.TopPart - this.Right.RenderBounds.TopPart));
		}
コード例 #8
0
ファイル: NuGenSqr.cs プロジェクト: xuchuansheng/GenXSource
		/// <summary>
		/// Measures the element and its subitems with the specified <see cref="NuGenRenderElementArgs"/>
		/// on the specified location.
		/// </summary>
		/// <param name="e"></param>
		/// <param name="location"></param>
		public override void RenderElement(NuGenRenderElementArgs e, Point location)
		{
			//render child element
			this.Element.RenderElement(e, new Point(
				location.X + 7,
				location.Y + 2));
			//render root
			e.Graphics.DrawLines(e.Pen, new Point[]
				{
					new Point(location.X+1,location.Y+3*this.RenderBounds.Height/4),
					new Point(location.X+3,location.Y+3*this.RenderBounds.Height/4-1),
					new Point(location.X+5,location.Y+this.RenderBounds.Height-2),
					new Point(location.X+6,location.Y+2),
					new Point(location.X+this.RenderBounds.Width,location.Y+2),
					new Point(location.X+this.RenderBounds.Width,location.Y+4)
				});
		}
コード例 #9
0
 /// <summary>
 /// Measures the element and its subitems with the specified <see cref="NuGenRenderElementArgs"/>
 /// on the specified location.
 /// </summary>
 /// <param name="e"></param>
 /// <param name="location"></param>
 public override void RenderElement(NuGenRenderElementArgs e, Point location)
 {
     //render child element
     this.Element.RenderElement(e, new Point(
                                    location.X + 7,
                                    location.Y + 2));
     //render root
     e.Graphics.DrawLines(e.Pen, new Point[]
     {
         new Point(location.X + 1, location.Y + 3 * this.RenderBounds.Height / 4),
         new Point(location.X + 3, location.Y + 3 * this.RenderBounds.Height / 4 - 1),
         new Point(location.X + 5, location.Y + this.RenderBounds.Height - 2),
         new Point(location.X + 6, location.Y + 2),
         new Point(location.X + this.RenderBounds.Width, location.Y + 2),
         new Point(location.X + this.RenderBounds.Width, location.Y + 4)
     });
 }
コード例 #10
0
ファイル: NuGenRamainder.cs プロジェクト: radtek/GenXSource
        /// <summary>
        /// Measures the element and its subitems with the specified <see cref="NuGenRenderElementArgs"/>
        /// on the specified location.
        /// </summary>
        /// <param name="e"></param>
        /// <param name="location"></param>
        public override void RenderElement(NuGenRenderElementArgs e, Point location)
        {
            //render first subelement
            this.Left.RenderElement(e, new Point(
                                        location.X,
                                        location.Y + this.RenderBounds.TopPart - this.Left.RenderBounds.TopPart));
            //render operator
            int height = (int)e.Graphics.MeasureString("mod", e.Font).Height;

            e.Graphics.DrawString("mod", e.Font, e.Brush,
                                  location.X + this.RenderBounds.LeftPart,
                                  location.Y + this.RenderBounds.TopPart - height / 2);
            //render second subelement
            this.Right.RenderElement(e, new Point(
                                         location.X + this.RenderBounds.Width - this.Right.RenderBounds.Width,
                                         location.Y + this.RenderBounds.TopPart - this.Right.RenderBounds.TopPart));
        }
コード例 #11
0
ファイル: NuGenPower.cs プロジェクト: xuchuansheng/GenXSource
		/// <summary>
		/// Measures the element and its subitems with the specified <see cref="NuGenRenderElementArgs"/>
		/// on the specified location.
		/// </summary>
		/// <param name="e"></param>
		/// <param name="location"></param>
		public override void RenderElement(NuGenRenderElementArgs e, Point location)
		{
			//render first subelement
			this.Left.RenderElement(e, new Point(
				location.X,
				location.Y + this.RenderBounds.TopPart - this.Left.RenderBounds.TopPart));
			//prepare graphics
			Matrix transform = e.Graphics.Transform;
			e.Graphics.TranslateTransform(
				location.X + this.RenderBounds.Width - this.Right.RenderBounds.Width / 2,
				location.Y + 1);
			e.Graphics.ScaleTransform(0.5f, 0.5f);
			//render subelement
			this.Right.RenderElement(e, Point.Empty);
			//reset graphics
			e.Graphics.Transform = transform;
		}
コード例 #12
0
        /// <summary>
        /// Measures the element and its subitems with the specified <see cref="NuGenRenderElementArgs"/>
        /// on the specified location.
        /// </summary>
        /// <param name="e"></param>
        /// <param name="location"></param>
        public override void RenderElement(NuGenRenderElementArgs e, Point location)
        {
            //render first subelement
            this.Left.RenderElement(e, new Point(
                                        location.X,
                                        location.Y + this.RenderBounds.TopPart - this.Left.RenderBounds.TopPart));
            //prepare graphics
            Matrix transform = e.Graphics.Transform;

            e.Graphics.TranslateTransform(
                location.X + this.RenderBounds.Width - this.Right.RenderBounds.Width / 2,
                location.Y + 1);
            e.Graphics.ScaleTransform(0.5f, 0.5f);
            //render subelement
            this.Right.RenderElement(e, Point.Empty);
            //reset graphics
            e.Graphics.Transform = transform;
        }
コード例 #13
0
		/// <summary>
		/// Measures the element and its subitems with the specified <see cref="NuGenRenderElementArgs"/>
		/// on the specified location.
		/// </summary>
		/// <param name="e"></param>
		/// <param name="location"></param>
		public override void RenderElement(NuGenRenderElementArgs e, Point location)
		{
			// Render first sub-element.
			this.Left.RenderElement(e, new Point(
				location.X,
				location.Y + this.RenderBounds.TopPart - this.Left.RenderBounds.TopPart));
			// Render operator.
			e.Graphics.DrawLine(e.Pen,
				location.X + this.RenderBounds.LeftPart, location.Y + this.RenderBounds.TopPart - 3,
				location.X + this.RenderBounds.LeftPart, location.Y + this.RenderBounds.TopPart + 3);
			e.Graphics.DrawLine(e.Pen,
				location.X + this.RenderBounds.LeftPart - 3, location.Y + this.RenderBounds.TopPart,
				location.X + this.RenderBounds.LeftPart + 3, location.Y + this.RenderBounds.TopPart);
			// Render second sub-element.
			this.Right.RenderElement(e, new Point(
				location.X + this.RenderBounds.Width - this.Right.RenderBounds.Width,
				location.Y + this.RenderBounds.TopPart - this.Right.RenderBounds.TopPart));
		}
コード例 #14
0
ファイル: NuGenLog.cs プロジェクト: xuchuansheng/GenXSource
		/// <summary>
		/// Measures the element and its subitems with the specified <see cref="NuGenRenderElementArgs"/>
		/// on the specified location.
		/// </summary>
		/// <param name="e"></param>
		/// <param name="location"></param>
		public override void RenderElement(NuGenRenderElementArgs e, Point location)
		{
			//measure "log" size
			Size funcsize = Size.Round(e.Graphics.MeasureString("log", e.Font));
			//draw "log"
			e.Graphics.DrawString("log", e.Font, e.Brush,
				location.X,
				location.Y + this.RenderBounds.TopPart - funcsize.Height / 2);
			//draw opening bracket
			e.Graphics.DrawArc(e.Pen,
				location.X + funcsize.Width, location.Y,
				3, this.RenderBounds.Height, 90, 180);
			//draw subelement
			this.Element.RenderElement(e, new Point(
				location.X + funcsize.Width + 3,
				location.Y + this.RenderBounds.TopPart - this.Element.RenderBounds.TopPart));
			//draw closing bracket
			e.Graphics.DrawArc(e.Pen,
				location.X + this.RenderBounds.Width - 3,
				location.Y,
				3, this.RenderBounds.Height, 270, 180);
		}
コード例 #15
0
ファイル: NuGenFac.cs プロジェクト: radtek/GenXSource
        /// <summary>
        /// Measures the element and its subitems with the specified <see cref="NuGenRenderElementArgs"/>
        /// on the specified location.
        /// </summary>
        /// <param name="e"></param>
        /// <param name="location"></param>
        public override void RenderElement(NuGenRenderElementArgs e, Point location)
        {
            //measure "!" size
            Size funcsize = Size.Round(e.Graphics.MeasureString("!", e.Font));

            //draw "!"
            e.Graphics.DrawString("!", e.Font, e.Brush,
                                  location.X,
                                  location.Y + this.RenderBounds.TopPart - funcsize.Height / 2);
            //draw opening bracket
            e.Graphics.DrawArc(e.Pen,
                               location.X + funcsize.Width, location.Y,
                               3, this.RenderBounds.Height, 90, 180);
            //draw subelement
            this.Element.RenderElement(e, new Point(
                                           location.X + funcsize.Width + 3,
                                           location.Y + this.RenderBounds.TopPart - this.Element.RenderBounds.TopPart));
            //draw closing bracket
            e.Graphics.DrawArc(e.Pen,
                               location.X + this.RenderBounds.Width - 3,
                               location.Y,
                               3, this.RenderBounds.Height, 270, 180);
        }
コード例 #16
0
		/// <summary>
		/// Measures the element and its subitems with the specified <see cref="NuGenRenderElementArgs"/>
		/// on the specified location.
		/// </summary>
		public abstract void RenderElement(NuGenRenderElementArgs e, Point location);
コード例 #17
0
		/// <summary>
		/// Measures the element and its subitems with the specified <see cref="NuGenRenderElementArgs"/>
		/// on the specified location.
		/// </summary>
		/// <param name="e"></param>
		/// <param name="location"></param>
		public override void RenderElement(NuGenRenderElementArgs e, Point location)
		{
			e.Graphics.DrawString(this.ToString(), e.Font, e.Brush, location);
		}
コード例 #18
0
 /// <summary>
 /// Measures the element and its subitems with the specified <see cref="NuGenRenderElementArgs"/>
 /// on the specified location.
 /// </summary>
 public abstract void RenderElement(NuGenRenderElementArgs e, Point location);
コード例 #19
0
ファイル: NuGenVariable.cs プロジェクト: radtek/GenXSource
 /// <summary>
 /// Measures the element and its subitems with the specified <see cref="NuGenRenderElementArgs"/>
 /// on the specified location.
 /// </summary>
 /// <param name="e"></param>
 /// <param name="location"></param>
 public override void RenderElement(NuGenRenderElementArgs e, Point location)
 {
     e.Graphics.DrawString(this.ToString(), e.Font, e.Brush, location);
 }