Hpgl.Language.HPoint.Add C# (CSharp) Method

Add() public method

public Add ( HPoint p ) : HPoint
p HPoint
return HPoint
        public HPoint Add(HPoint p)
        {
            return new HPoint() { X = X + p.X, Y = Y + p.Y };
        }

Same methods

HPoint::Add ( int x, int y ) : HPoint

Usage Example

示例#1
0
 protected override void MoveTo(HPoint p)
 {
     if (isPenDown)
     {
         if (Numbering && HPoint.LengthAbs(p, lastText)>20)
         {
             var tp = ToPoint(p);
             g.DrawString(counter + "", SystemFonts.IconTitleFont, Brushes.Black, tp.X, tp.Y);
             counter++;
             lastText = p;
         }
         if (current == p)
         {
             g.DrawLine(currentGPen, ToPoint(p), ToPoint(p.Add(new HPoint(1, 1))));
         }
         else
         {
             g.DrawLine(currentGPen, ToPoint(current), ToPoint(p));
         }
     }
     else
     {
         if (DebugPenUp)
         {
             g.DrawLine(debugPen, ToPoint(current), ToPoint(p));
         }
     }
     base.MoveTo(p);
 }
All Usage Examples Of Hpgl.Language.HPoint::Add