Exemplo n.º 1
0
 public static PageRect RectFor(PageAddress addr)
 {
   PageRect ret = new PageRect();
   ret.X = addr.X * Page.TileSizeUnits;
   ret.Z = addr.Z * Page.TileSizeUnits;
   ret.W = Page.TileSizeUnits;
   ret.H = Page.TileSizeUnits;
   return ret;
 }
Exemplo n.º 2
0
        public static PageRect RectFor(PageAddress addr)
        {
            PageRect ret = new PageRect();

            ret.X = addr.X * Page.TileSizeUnits;
            ret.Z = addr.Z * Page.TileSizeUnits;
            ret.W = Page.TileSizeUnits;
            ret.H = Page.TileSizeUnits;
            return(ret);
        }
Exemplo n.º 3
0
 public void Union(PageRect r)
 {
   float NX = Math.Min(X, r.X);
   float NZ = Math.Min(Z, r.Z);
   float XM = Math.Max(X + W, r.X + r.W);
   float ZM = Math.Max(Z + H, r.Z + r.H);
   X = NX;
   Z = NZ;
   W = XM - X;
   H = ZM - Z;
   System.Diagnostics.Debug.Assert(W >= 0);
   System.Diagnostics.Debug.Assert(H >= 0);
 }
Exemplo n.º 4
0
        public void Union(PageRect r)
        {
            float NX = Math.Min(X, r.X);
            float NZ = Math.Min(Z, r.Z);
            float XM = Math.Max(X + W, r.X + r.W);
            float ZM = Math.Max(Z + H, r.Z + r.H);

            X = NX;
            Z = NZ;
            W = XM - X;
            H = ZM - Z;
            System.Diagnostics.Debug.Assert(W >= 0);
            System.Diagnostics.Debug.Assert(H >= 0);
        }
Exemplo n.º 5
0
 public void SetAddress(PageAddress addr, PageRect rect)
 {
     addr_ = addr;
     rect_ = rect;
 }
Exemplo n.º 6
0
 public void SetAddress(PageAddress addr, PageRect rect)
 {
   addr_ = addr;
   rect_ = rect;
 }