Example #1
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)
 {
     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);
 }
Example #2
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)
		{
			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);
		}
Example #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));
 }
		/// <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));
		}
Example #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));
		}
Example #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));
 }
		/// <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));
		}
Example #8
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)
				});
		}
Example #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)
     });
 }
Example #10
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));
        }
Example #11
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;
		}
Example #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;
        }
Example #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));
		}
Example #14
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)
		{
			//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);
		}
Example #15
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)
        {
            //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);
        }
		/// <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);
Example #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);
		}
Example #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);
Example #19
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);
 }