public bool Equals(CCSize s) { return Width == s.Width && Height == s.Height; }
public CCRect(CCSize sz) { Origin = CCPoint.Zero; Size = sz; }
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)); }
public static bool Equal(ref CCSize size1, ref CCSize size2) { return ((size1.Width == size2.Width) && (size1.Height == size2.Height)); }
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; }
public static CCPoint FromSize(CCSize s) { CCPoint pt; pt.X = s.Width; pt.Y = s.Height; return pt; }
public bool Equals(CCSize s) { return(Width == s.Width && Height == s.Height); }
public static bool Equal(ref CCSize size1, ref CCSize size2) { return((size1.Width == size2.Width) && (size1.Height == size2.Height)); }