Пример #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);
 }
Пример #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);
        }
Пример #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);
 }
Пример #4
0
 public Rect(int x, int y, int width, int height)
 {
     Location = new Point(x, y);
     Size = new Point(width, height);
 }
Пример #5
0
 public Rect(Rect r)
 {
     Location = new Point(r.Location);
     Size = new Point(r.Size);
 }
Пример #6
0
 public Rect(System.Drawing.Rectangle r)
 {
     Location = new Point(r.Left, r.Top);
     Size = new Point(r.Width, r.Height);
 }
Пример #7
0
 public void Set(Point location, Point size)
 {
     this.Location.Set(location);
     this.Size.Set(size);
 }
Пример #8
0
 public bool HitTest(Point HitPoint)
 {
     return HitTest(HitPoint.X, HitPoint.Y);
 }
Пример #9
0
 public Rect()
 {
     Location = new Point(0, 0);
     Size = new Point(0, 0);
 }
Пример #10
0
 public static Point operator -(Point p1, int i)
 {
     Point newPoint = new Point(p1.mx - i, p1.my - i);
     return newPoint;
 }
Пример #11
0
 public void Add(Point p)
 {
     Add(p.X, p.Y);
 }
Пример #12
0
 public static Point operator -(Point p1, Point p2)
 {
     Point newPoint = new Point(p1.X - p2.X, p1.Y - p2.Y);
     return newPoint;
 }
Пример #13
0
 public static Point operator +(Point p1, int i)
 {
     Point newPoint = new Point(p1.X + i, p1.Y + i);
     return newPoint;
 }
Пример #14
0
 public Point(Point CloneFrom)
 {
     X = CloneFrom.X;
     Y = CloneFrom.Y;
 }
Пример #15
0
 public void Set(Point p)
 {
     Set(p.X, p.Y);
 }
Пример #16
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;
        }