GMap.NET.Core/GMap.NET/GSize.cs

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。


namespace GMap.NET
{
   using System.Globalization;

   /// <summary>
   /// the size
   /// </summary>
   public struct GSize
   {
      public static readonly GSize Empty = new GSize();

      private int width;
      private int height;

      public GSize(GPoint pt)
      {
         width = pt.X;
         height = pt.Y;
      }

      public GSize(int width, int height)
      {
         this.width = width;
         this.height = height;
      }

      public static GSize operator +(GSize sz1, GSize sz2)
      {
         return Add(sz1, sz2);
      }

      public static GSize operator -(GSize sz1, GSize sz2)
      {
         return Subtract(sz1, sz2);
      }

      public static bool operator ==(GSize sz1, GSize sz2)
      {
         return sz1.Width == sz2.Width && sz1.Height == sz2.Height;
      }

      public static bool operator !=(GSize sz1, GSize sz2)
      {
         return !(sz1 == sz2);
      }

      public static explicit operator GPoint(GSize size)
      {
         return new GPoint(size.Width, size.Height);
      }

      public bool IsEmpty
      {
         get
         {
            return width == 0 && height == 0;
         }
      }

后面还有 61 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。