Exemplo n.º 1
0
 public bool Equals(CCSize s)
 {
     return Width == s.Width && Height == s.Height;
 }
Exemplo n.º 2
0
 public CCRect(CCSize sz)
 {
     Origin = CCPoint.Zero;
     Size   = sz;
 }
Exemplo n.º 3
0
 public CCSize Clamp(CCSize max)
 {
     float w = (Width > max.Width) ? max.Width : Width;
     float h = (Height > max.Height) ? max.Height : Height;
     return (new CCSize(w, h));
 }
Exemplo n.º 4
0
 public static bool Equal(ref CCSize size1, ref CCSize size2)
 {
     return ((size1.Width == size2.Width) && (size1.Height == size2.Height));
 }
Exemplo n.º 5
0
        public static CCSize CCSizeFromString(string pszContent)
        {
            CCSize ret = new CCSize();

            do
            {
                List<string> strs = new List<string>();
                if (!CCUtils.SplitWithForm(pszContent, strs)) break;

                float width = CCUtils.CCParseFloat(strs[0]);
                float height = CCUtils.CCParseFloat(strs[1]);

                ret = new CCSize(width, height);
            } while (false);

            return ret;
        }
Exemplo n.º 6
0
 public CCRect(CCSize sz)
 {
     Origin = CCPoint.Zero;
     Size = sz;
 }
Exemplo n.º 7
0
 public static CCPoint FromSize(CCSize s)
 {
     CCPoint pt;
     pt.X = s.Width;
     pt.Y = s.Height;
     return pt;
 }
Exemplo n.º 8
0
 public bool Equals(CCSize s)
 {
     return(Width == s.Width && Height == s.Height);
 }
Exemplo n.º 9
0
 public static bool Equal(ref CCSize size1, ref CCSize size2)
 {
     return((size1.Width == size2.Width) && (size1.Height == size2.Height));
 }