public static long Quad16ToLong(Quad16 rect) { long result = 0; result = result | SetQuarter(System.Convert.ToInt16(rect.X), Quarter.hihi); result = result | SetQuarter(System.Convert.ToInt16(rect.Y), Quarter.hilo); result = result | SetQuarter(System.Convert.ToInt16(rect.W), Quarter.lohi); result = result | SetQuarter(System.Convert.ToInt16(rect.H), Quarter.lolo); return(result); }
public static Quad16 LongToQuad16(long value) { long temp = GetQuarter(value, Quarter.hihi); Quad16 result = new Quad16( System.Convert.ToInt16(GetQuarter(value, Quarter.hihi)), System.Convert.ToInt16(GetQuarter(value, Quarter.hilo)), System.Convert.ToInt16(GetQuarter(value, Quarter.lohi)), System.Convert.ToInt16(GetQuarter(value, Quarter.lolo)) ); return(result); }