Example #1
0
 public Rect(Point NewLocation, Point NewSize)
 {
     Location = NewLocation;
     Size = NewSize;
     if (Location == null)
         Location = new Point(0, 0);
     if (Size == null)
         Size = new Point(0, 0);
 }
Example #2
0
        public GuiLabs.Canvas.Point StringSize(string Text, IFontInfo theFont)
        {
            System.Drawing.SizeF s = new System.Drawing.SizeF();

            s = mGraphics.MeasureString(Text, ((GDIPlusFontWrapper)theFont).Font);

            GuiLabs.Canvas.Point result = new GuiLabs.Canvas.Point((int)s.Width, (int)s.Height);
            return(result);
        }
Example #3
0
 public void DrawLine(GuiLabs.Canvas.Point p1, GuiLabs.Canvas.Point p2, ILineStyleInfo theStyle)
 {
     mGraphics.DrawLine(((GDIPlusLineStyle)theStyle).Pen, p1.X, p1.Y, p2.X, p2.Y);
 }
Example #4
0
 public Rect(int x, int y, int width, int height)
 {
     Location = new Point(x, y);
     Size = new Point(width, height);
 }
Example #5
0
 public Rect(Rect r)
 {
     Location = new Point(r.Location);
     Size = new Point(r.Size);
 }
Example #6
0
 public Rect(System.Drawing.Rectangle r)
 {
     Location = new Point(r.Left, r.Top);
     Size = new Point(r.Width, r.Height);
 }
Example #7
0
 public void Set(Point location, Point size)
 {
     this.Location.Set(location);
     this.Size.Set(size);
 }
Example #8
0
 public bool HitTest(Point HitPoint)
 {
     return HitTest(HitPoint.X, HitPoint.Y);
 }
Example #9
0
 public Rect()
 {
     Location = new Point(0, 0);
     Size = new Point(0, 0);
 }
Example #10
0
 public static Point operator -(Point p1, int i)
 {
     Point newPoint = new Point(p1.mx - i, p1.my - i);
     return newPoint;
 }
Example #11
0
 public void Add(Point p)
 {
     Add(p.X, p.Y);
 }
Example #12
0
 public static Point operator -(Point p1, Point p2)
 {
     Point newPoint = new Point(p1.X - p2.X, p1.Y - p2.Y);
     return newPoint;
 }
Example #13
0
 public static Point operator +(Point p1, int i)
 {
     Point newPoint = new Point(p1.X + i, p1.Y + i);
     return newPoint;
 }
Example #14
0
 public Point(Point CloneFrom)
 {
     X = CloneFrom.X;
     Y = CloneFrom.Y;
 }
Example #15
0
 public void Set(Point p)
 {
     Set(p.X, p.Y);
 }
        public GuiLabs.Canvas.Point StringSize(string Text, IFontInfo theFont)
        {
            System.Drawing.SizeF s = new System.Drawing.SizeF();

            s = mGraphics.MeasureString(Text, ((GDIPlusFontWrapper)theFont).Font);

            GuiLabs.Canvas.Point result = new GuiLabs.Canvas.Point((int)s.Width, (int)s.Height);
            return result;
        }